8000 Ensure fileobj mode is str when checking for append mode by hssyoo · Pull Request #4527 · boto/boto3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ensure fileobj mode is str when checking for append mode #4527

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

Merged
merged 2 commits into from
May 7, 2025

Conversation

hssyoo
Copy link
Contributor
@hssyoo hssyoo commented May 7, 2025

Fixes #4526

If a file-like object with a non-standard interface (eg integer value for mode property) is passed to is_append_mode, it may cause a runtime error or undefined behavior. We can't make assumptions about unknown interfaces, so always return False if mode isn't a string. Shutting off threading for every non-string implementation is going to have unknown performance impact.

@hssyoo hssyoo merged commit e84865b into boto:develop May 7, 2025
33 checks passed
@hssyoo hssyoo deleted the download-fileobj-append branch May 7, 2025 19:54
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.

S3 client download_fileobj became incompatible with GzipFile from stdlib
2 participants
0