[BUG] SAS token with only date in expiration time fails with IllegalArgumentException
#35545
Closed
3 tasks done
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-triage
Workflow: This issue needs the team to triage.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Storage
Storage Service (Queues, Blobs, Files)
Describe the bug
When providing a SAS token containing
se=20XX-XX-XX
in the token, we get an exception even though it states it is supported to only include a date here which is referenced by the page for SAS tokens here.We get an exception originating from here with
java.lang.IllegalArgumentException: Invalid Date String: 20XX-XX-XX. at com.azure.storage.common.implementation.StorageImplUtils.parseDateAndFormat(StorageImplUtils.java:413) Invalid Date String: 20XX-XX-XX.
.Exception or Stack Trace
To Reproduce
BlobUrlParts.parse(new URL("https://<storage-account>.blob.core.windows.net/<container>/<file>?sv=2021-04-10&spr=https&se=2023-06-20&sr=b&sp=r&sig=xyz"));
fails with
Code Snippet
Above ^
Expected behavior
Don't fail.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: