Skip to content

Escaping failure on blob DELETE #24562

@yonderblue

Description

@yonderblue

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.

Metadata

Metadata

Labels

StorageStorage Service (Queues, Blobs, Files)bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions