microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
365 stars 85 forks source link

The error message does not make sense when saving '汉字‘ as the metadata key for blob containers/blobs/queues #7853

Closed v-xianya closed 1 month ago

v-xianya commented 2 months ago

Storage Explorer Version: 1.33.1 (98) Build Number: 20240409.2 Branch: hotfix/1.33.1 Platform/OS: Windows 10/Linux Ubuntu 22.04/MacOS Sonoma 14.4(Apple M1 Pro) Architecture: x64/x64/arm64 How Found: Ad-hoc testing Regression From: Not a regression

Steps to Reproduce

  1. Expand one storage account -> Blob Containers.
  2. Create a blob container -> Right click the blob container.
  3. Click 'Properties...' -> Click 'Add Metadata' -> Type '汉字' in the metadata key field -> Save it. image
  4. There is a failed activity log -> Click 'Details...'.
  5. Check whether the error message makes sense.

Expected Experience

The error message makes sense. Like 'The metadata specified is invalid.'

Actual Experience

The error message doesn't make sense. Error details: "message": "Cannot convert argument to a ByteString because the character at index 10 has a value of 27721 which is greater than 255." image

Additional Context

Here is the screenshot for files under file shares when saving metadata whose metadata key is '汉字'. Error details: "stack": "RestError: The metadata specified is invalid. It has characters that are not permitted. image

MRayermannMSFT commented 2 months ago

We should have validation that catches this case (assuming it is actually invalid).

v-xianya commented 1 month ago

Verified this issue on the main build 20240604.2. Fixed. So, we are going to close it. image