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

[BUG] sourceUriBuilder.DirectoryOrFilePath is not escaped when building renameSource URL #14402

Closed
Sense545 opened this issue Aug 20, 2020 · 5 comments
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. Data Lake Storage Gen2 needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@Sense545
Copy link

Describe the bug
Trying to rename a path containing spaces results in "The source URI is invalid." error from server.

Apparently the same exact bug was reported and fixed in the Java SDK in March:
Azure/azure-sdk-for-java#8761
https://github.com/Azure/azure-sdk-for-java/pull/8887/files#diff-0fc00850cd2388279fd01c5f427d6cfcR506

Probably just need sourceUriBuilder.DirectoryOrFilePath.EscapePath() here.

string renameSource = "/" + sourceUriBuilder.FileSystemName + "/" + sourceUriBuilder.DirectoryOrFilePath;

Expected behavior
No error from server and rename being successful.

Actual behavior (include Exception or Stack Trace)
Error from server "The source URI is invalid"

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)

  1. var sourceFileClient = dataLakeFileSystemClient.GetFileClient("some file with spaces.txt");
  2. await sourceFileClient.RenameAsync("new file name.txt");

Environment:

  • Azure.Storage.Files.DataLake 12.3.1
@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 20, 2020
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Data Lake Storage Gen2 needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. labels Aug 20, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 20, 2020
@ghost
Copy link

ghost commented Aug 20, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sumantmehtams.

@jsquire
Copy link
Member

jsquire commented Aug 20, 2020

Thank you for your feedback. Tagging and routing to the team best able to assist.

@sumantmehtams
Copy link

Adding @seanmcc-msft to take a look.

@seanmcc-msft seanmcc-msft added the Storage Storage Service (Queues, Blobs, Files) label Sep 2, 2020
@ghost
Copy link

ghost commented Sep 2, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@seanmcc-msft
Copy link
Member

Hi @Sense545, thanks for reporting this.

I have fixed this issue with #15106.

-Sean

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-net that referenced this issue May 13, 2021
t2 sqlvirtualmachine(wave4) (Azure#14402)

* sql t2 readme config

* readme config

* conflient resolve

* readme t2 config
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. Data Lake Storage Gen2 needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

4 participants