Skip to content
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

[StgExp] ADLS Gen 2 encoded path name removal fails #2549

Closed
gapra-msft opened this issue Jan 22, 2024 · 2 comments · Fixed by #2599
Closed

[StgExp] ADLS Gen 2 encoded path name removal fails #2549

gapra-msft opened this issue Jan 22, 2024 · 2 comments · Fixed by #2599
Assignees
Labels
bug dependencies Pull requests that update a dependency file

Comments

@gapra-msft
Copy link
Member

Which version of the AzCopy was used?

Note: The version is visible when running AzCopy without any argument

10.22.2

Which platform are you using? (ex: Windows, Mac, Linux)

any

What command did you run?

Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.

./azcopy.exe rm https://XXXX.dfs.core.windows.net/XXXX/%23%2C%25%2C%3F?SAS --from-to=BlobFSTrash --recursive --log-level=DEBUG

What problem was encountered?

removal of path fails with invalid URL escape "%,?"

How can we reproduce the problem in the simplest way?

Create a directory in an HNS account called #,%,? and run the above command

Have you found a mitigation/solution?

you could use the blob endpoint

related issue microsoft/AzureStorageExplorer#7692

The root cause of the issue is the datalake Go SDK. FileSystemClient.NewDirectoryClient and NewFileClient do not call url.PathEscape on the directoryName or fileName passed. See ContainerClient.NewBlobClient for how it should be handled. Special care should be taken so that both the APIs that hit blob endpoints and dfs endpoints continue to work after the fix is made.

@gapra-msft
Copy link
Member Author

Note: When we pick up the new SDK dependency, add tests testing the above.

@Steven23661
Copy link

93162b88ad1b421dd67659d3cd59224bd3af3c1393162b88ad1b421dd67659d3cd59224bd3af3c13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants