-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-127794: Validate header name according to rfc-5322 #127820
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
Changes from 81 commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
901a91c
gh-127794: Validate header name according rfc-5322 and allow only pri…
srinivasreddy 5be0eaa
Add test case
srinivasreddy 6ae6273
Add some more tests
srinivasreddy a7d1c0c
Fix indentation
srinivasreddy d04c9a2
Add news entry
srinivasreddy bcab963
Merge branch 'main' into gh-127794
srinivasreddy 53bdb4f
gh-127794: Create a separate function for validating header
srinivasreddy 31e4f3e
gh-127794: Coverge all the validations into a single regex
srinivasreddy fae3664
gh-127794: Revert the changes
srinivasreddy 026f35b
gh-127794: Remove one variable
srinivasreddy 8f6f6c3
gh-127794: Update tests
srinivasreddy ce18c9b
Address review comments
srinivasreddy aaa8879
Address review comments
srinivasreddy fb73967
Merge branch 'main' into gh-127794
srinivasreddy 1de4e4c
Merge branch 'main' into gh-127794
srinivasreddy b29f1aa
Merge branch 'main' into gh-127794
srinivasreddy 075a44a
Add some more tests
srinivasreddy d1b07c5
Fix the function name
srinivasreddy 8129d13
Add test case for invalid_header_names
srinivasreddy 5e371cc
Update tests
srinivasreddy 84d2aec
Remove redundant regular expression
srinivasreddy ebd47a4
Update the regex per review comments
srinivasreddy 541f59b
Update test cases
srinivasreddy 3ac53da
Improve blurb message
srinivasreddy 4882f44
Fix failing test
srinivasreddy 9726c21
Update parameter name
srinivasreddy d6549a0
Merge branch 'main' into gh-127794
srinivasreddy 44985a4
Update Misc/NEWS.d/next/Library/2024-12-11-17-44-36.gh-issue-127794.V…
srinivasreddy c83b6bf
gh-115999: Enable BINARY_SUBSCR_GETITEM for free-threaded build (gh-1…
corona10 d0256e6
gh-128069: brew link --overwrite tcl-tk@8 to prevent conflict with Gi…
vstinner 6f3f0d4
gh-128013: fix data race in `PyUnicode_AsUTF8AndSize` on free-threadi…
kumaraditya303 efdc31f
gh-122706: fix docs for asyncio ssl sockets (#128092)
kumaraditya303 dd5fcc0
gh-127688: Add `SCHED_DEADLINE` and `SCHED_NORMAL` constants to `os` …
rruuaanng 2fade09
gh-128083: Fix macro redefinition warning in clinic. (GH-127950)
ZeroIntensity e521e71
gh-127951: Add build option to enable pystats on Windows (GH-127952)
eendebakpt 6853c1c
gh-128008: Add `PyWeakref_IsDead()` (GH-128009)
colesbury 07eb113
GH-122548: Implement branch taken and not taken events for sys.monito…
markshannon 6e55b1b
gh-115999: Specialize `STORE_ATTR` in free-threaded builds. (gh-127838)
nascheme d28ddba
gh-128062: Fix the font size and shortcut display of the turtledemo m…
Xiaokang2022 08c1491
gh-127274: Defer nested methods (#128012)
mpage 356306e
gh-128080: remove unnecessary `__init__` method from Enum (GH-128081)
tungol 9c87b55
gh-112328: Document EnumDict in docs and release notes (GH-121720)
u2rafi 9afb5d8
gh-128058: Fix test_builtin ImmortalTests (#128068)
vstinner a548261
gh-128030: Avoid error from PyModule_GetFilenameObject for non-module…
hauntsaninja 35fd9ed
GH-122548: Correct magic number comment (GH-128115)
markshannon 77175aa
gh-109959: Log the current directory in test_glob.test_selflink() (#1…
vstinner e803dea
gh-128116: Skip test_socket VSOCK testStream() on PermissionError (#1…
vstinner 952fc1f
gh-127946: Use a critical section for `CFuncPtr` attributes (GH-128109)
ZeroIntensity 6ef3119
gh-127295: ctypes: Switch field accessors to fixed-width integers (GH…
encukou 4aa1b13
GH-127705: Add debug mode for `_PyStackRef`s inspired by HPy debug mo…
markshannon 867ddb4
Python Tutorial typo fix (#128077)
shallow-beach 349b5ec
gh-128049: Fix type confusion bug with the return value of a custom E…
Nico-Posada 8d4f62d
gh-112328: Make EnumDict usable on its own and document it (GH-123669)
encukou 37e6e64
GH-127807: pathlib ABCs: remove `PurePathBase._raw_paths` (#127883)
barneygale 3e44493
GH-127807: pathlib ABCs: remove a few private attributes (#127851)
barneygale 6aba8e0
GH-127807: pathlib ABCs: move private copying methods to dedicated cl…
barneygale 405782e
gh-126664: revert: Use `else` instead of `finally` in docs explaining…
gpshead 2ad5c8f
gh-127949: fix resource warnings in `test_tasks.py` (#128172)
graingert 6331c05
gh-119786: Fix typos in `InternalDocs/interpreter.md` (#128174)
WolframAlph a813023
gh-100384: Error on `unguarded-availability` in macOS builds (#128155)
zanieb b7bfacb
gh-126180: Remove getopt and optparse deprecation notices (GH-126227)
ncoghlan 3ce49be
Address review comments
srinivasreddy 7038404
Merge branch 'main' into gh-127794
srinivasreddy 32dc6c8
Update test case
srinivasreddy 151e146
Fix test failures
srinivasreddy 810f9cb
Update Lib/test/test_email/test_email.py
srinivasreddy 079dda7
Address review comments
srinivasreddy f69394e
Merge branch 'main' into gh-127794
srinivasreddy e45165f
Order imports as per case sensitive alphabetical order
srinivasreddy 8233e92
Remove the extraneous line
srinivasreddy 2550011
Move the validate_header_name up
srinivasreddy 31edff1
Merge branch 'main' into gh-127794
srinivasreddy 56a77e9
Add RFC section
srinivasreddy f2bbb92
Update Misc/NEWS.d/next/Library/2024-12-11-17-44-36.gh-issue-127794.V…
srinivasreddy 98e5920
Merge branch 'main' into gh-127794
srinivasreddy 9dfe0f1
Merge branch 'main' into gh-127794
srinivasreddy cf1f908
Merge branch 'main' into gh-127794
srinivasreddy d5c538f
Address review comments
srinivasreddy bf72d24
Merge branch 'main' into gh-127794
bitdancer 590c1ac
fixup typo
picnixz 958bcf3
fixup rst
picnixz 5f9d4a1
Update Misc/NEWS.d/next/Library/2024-12-11-17-44-36.gh-issue-127794.V…
picnixz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Library/2024-12-11-17-44-36.gh-issue-127794.VwmRsp.rst
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
When headers are added to :class:`email.message.Message` objects, either through | ||
:meth:`email.message.Message.__setitem__` or :meth:`email.message.Message.add_header`, | ||
the field name is now validated according to :rfc:`RFC 5322, Section 3.6.8 <5322#section-3.6.8>` | ||
and a :exc:`ValueError` is raised if the field name contains any invalid characters. | ||
picnixz marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.