Skip to content

gh-161092: Require an octal mode in the uu codec "begin" line - #161093

Merged
gpshead merged 1 commit into
python:mainfrom
gpshead:uu-codec-begin-header
Nov 1, 2026
Merged

gpshead merged 1 commit into
python:mainfrom
gpshead:uu-codec-begin-header

Conversation

@gpshead

@gpshead gpshead commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Only accept a begin line followed by an octal mode as the uuencode header in the uu codec's decoder, and skip other lines starting with begin as leading text. This is the rule email.message._decode_uu() uses; the filename stays optional, so headers like begin 666 keep working, unlike the removed uu.decode() which required one. Output of uu_encode() is unaffected. Deprecation of the codec is still undecided in gh-92613.

Fixes #161092

ANT-2026-XQTI5P71

Skip lines starting with "begin" that are not followed by an octal mode,
as email.message._decode_uu() does, instead of taking them as the header.
@gpshead gpshead self-assigned this Nov 1, 2026
@gpshead
gpshead marked this pull request as ready for review November 1, 2026 17:46
@gpshead
gpshead enabled auto-merge (squash) November 1, 2026 17:46
@gpshead
gpshead merged commit fb602e8 into python:main Nov 1, 2026
58 checks passed
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.

uu codec decoder treats any line starting with "begin" as the header

1 participant