-
Notifications
You must be signed in to change notification settings - Fork 76
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
Handle invalid Azure object metadata keys #7258
Handle invalid Azure object metadata keys #7258
Conversation
src/endpoint/s3/ops/s3_put_object.js
Outdated
@@ -49,7 +49,8 @@ async function put_object(req, res) { | |||
tagging, | |||
tagging_copy: s3_utils.is_copy_tagging_directive(req), | |||
encryption, | |||
lock_settings | |||
lock_settings, | |||
azure_invalid_tag_header: req.headers['azure-metadata-handling'] || undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a situation where meta data is passed but this header isn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that this is the default situation where a user simply uploads objects with md - it's a header I made up that should be supplied by the user if they want to choose a specific behavior
09ec9fb
to
b12c1bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
squash your commits
27d389c
to
31d3ca0
Compare
Signed-off-by: Ben <belimele@redhat.com>
31d3ca0
to
5a6f245
Compare
Explain the changes
The key of the newly added header is
azure-metadata-handling
, and its possible values are:RenameIfInvalid
- which will rename the key in order to preserve it (which is the default behavior if the header is not supplied)ExcludeIfInvalid
- which will exclude the invalid tagFailIfInvalid
- which will fail the uploadWe support the same naming and recovery methodologies as Microsoft, meaning we won't be able to discern between tags whose renamed form cannot be restored (e.g. -
!@#
and#$%
on the same object)Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
!@#-
) to a bucket backed by an Azure namespacestoreBonus step:
rename_
andrename_key_