Skip to content

[WIP] Escaping failure on blob DELETE #24698

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 28, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

Bug Report

go.mod has:

github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect
  • What happened?

    Tried to delete a nonexistent blob with a tab in the blob name, only to get:

DELETE https://***.blob.core.windows.net/***/test/8d2c49bac5508e462cfe/1b4065bd5a50da115809	1a72b71e016e13da895d
--------------------------------------------------------------------------------
RESPONSE 400: 400 The requested URI does not represent any resource on the server.
ERROR CODE: InvalidUri
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<Error><Code>InvalidUri</Code><Message>The requested URI does not represent any resource on the server.
RequestId:b1db98f2-001e-0068-16da-bd1294000000
Time:2025-05-05T16:25:02.6234612Z</Message></Error>
--------------------------------------------------------------------------------
	type=*exported.ResponseError
  • What did you expect or want to happen?

    A 404.

  • How can we reproduce it?

    By putting a tab character anywhere in the blob name, path encoded. The above was setup like:

blobURL := containerURL + "/" + prefix + "/" + url.PathEscape(blobName)
client := blockblob.NewClientWithSharedKeyCredential(blobURL, cred, o)

and before the client.Delete(), the client.URL() looked like:

https://***.blob.core.windows.net/***/test/8d2c49bac5508e462cfe/1b4065bd5a50da115809%091a72b71e016e13da895d
  • Anything we should know about your environment.

    This was a test case, but we do have a file in azure that somehow got a tab in the blob name, which we cannot now access.

Fixes #24562.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Escaping failure on blob DELETE
2 participants