-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed bug where getFileClient and getSubDirectoryClient on DirectoryClient would throw IllegalArgumentException if either resource had special characters. #18542
Conversation
@@ -173,8 +173,8 @@ public DataLakeFileAsyncClient getFileAsyncClient(String fileName) { | |||
|
|||
return new DataLakeFileAsyncClient(getHttpPipeline(), | |||
StorageImplUtils.appendToUrlPath(getPathUrl(), Utility.urlEncode(Utility.urlDecode(fileName))).toString(), | |||
getServiceVersion(), getAccountName(), getFileSystemName(), getObjectPath() + "/" | |||
+ Utility.urlDecode(fileName), blockBlobAsyncClient); | |||
getServiceVersion(), getAccountName(), getFileSystemName(), Utility.urlEncode(getObjectPath() + "/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constructor expects an encoded path
resourcePrefix | subResourcePrefix || _ | ||
"" | "" || _ | ||
Utility.urlEncode("%") | "" || _ // Resource has special character | ||
"" | Utility.urlEncode("%") || _ // Sub resource has special character |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should check the path against the expected string to ensure the right amount of encoding/decoding is happening
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add that
SCVMM public preview API spec (Azure#18542) * add openapi spec for scvmm * lint fixes, spell fixes * typo fix * prettier * force delete query param * removing some deprecated properties * remove additional props
Resolves #18469