-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugThis issue is a confirmed bug.This issue is a confirmed bug.p2This is a standard priority issueThis is a standard priority issues3
Description
Describe the bug
botocore fails to process an S3 CreateMultipartUpload request when the response contains characters which are invalid according to XML 1.0. Commonly this happens when the S3 object key contains ASCII control characters.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The response should be processed without error.
Current Behavior
An exception is raised:
Traceback (most recent call last):
File "awscli/botocore/parsers.py", line 537, in _parse_xml_string_to_dom
xml.etree.ElementTree.ParseError: reference to invalid character number: line 2, column 122
Reproduction Steps
Using awscli, run a command like the following:
aws s3api create-multipart-upload --bucket mdg-test-20250618 --key $'test\u0007.txt' --debug
Possible Solution
- Extend AWS S3 service to not generate invalid XML in the CreateMultipartUpload response.
- Modify botocore to be more relaxed in its XML parsing code.
Additional Information/Context
SDK version used
aws-cli/2.27.37
Environment details (OS name and version, etc.)
Gentoo Linux
Metadata
Metadata
Assignees
Labels
bugThis issue is a confirmed bug.This issue is a confirmed bug.p2This is a standard priority issueThis is a standard priority issues3