fix(make-mime): preserve non-ASCII attachment filenames - #7071
Open
Benziza wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Commit Message
Additional Context
make-mimeloses filenames such ascafé.yamlandإعداد.yamlwhen its output is parsed:get_filename()returnsNone, andUserDataProcessorsubstitutespart-001. The attachment content is preserved.Pass
filenameseparately toadd_headerso Python applies RFC 2231 encoding, matching the existing pattern incloudinit/user_data.py. No CLI options change.Test Steps
check_formatremains unsuccessful locally: Python 3.12 reports PylintE1120incloudinit/util.py:2142(also reproduced on unmodifiedmain), while Python 3.14 reports missingcryptimports in unchanged files.CLI reproduction
Run from the checkout after creating the tox test environment. No VM is required.
Before the fix, the filename assertion fails because the parsed filename is
None. Afterward, both assertions pass. Temporary files are cleaned up automatically.Merge type