Azure / Azure/azure-storage-python

Issue when generating a url using sas token. Method file_service.make_file_url()

Đang mở
#609 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
343
Fork
243
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Which service(blob, file, queue) does this issue concern?
File share

### Which version of the SDK was used? Please provide the output of `pip freeze`.
azure-storage-file==2.0.1
azure-storage-common==2.0.0
![sdk-version](https://user-images.githubusercontent.com/32823639/59706469-ea36ce80-91d6-11e9-9dde-670ecbc4e589.PNG)

### What problem was encountered?
https://github.com/Azure/azure-storage-python/blob/b8c5c9a1bc73065fd015c0fec75617cef263c6ee/azure-storage-file/azure/storage/file/fileservice.py#L233

When genrating a url using the method `make_file_url` passing a sas token, the generated url has two query strings ('?') instead of one.
![generated_url](https://user-images.githubusercontent.com/32823639/59705929-c9ba4480-91d5-11e9-8d38-c9809189db2f.PNG)

The SaS Token generated on Azure portal starts with a query string.
![SaSToken-Azure](https://user-images.githubusercontent.com/32823639/59706075-1140d080-91d6-11e9-8f4e-9a45607b1d28.PNG)

### Have you found a mitigation/solution?
Yes. Remove the query string ('?') at line 233.

Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start in azure-storage-file/azure/storage/file/fileservice.py at line 233 and reproduce make_file_url() with a SAS token generated by the Azure portal. Verify that the resulting file URL contains one query-string delimiter rather than two. The issue does not name a test file, so inspect nearby URL-generation tests if present.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, python
Lĩnh vực
api, cloud
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.