Skip to content

gh-65697: Improved error msg for configparser key validation #135527

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 3 commits into from
Jun 15, 2025

Conversation

lincolnj1
Copy link
Contributor

@lincolnj1 lincolnj1 commented Jun 15, 2025

In 3.14, I updated the configparser to validate keys before writing them due to security concerns. As mentioned in recent discussion on gh-65697, this error message isn't terribly helpful and users didn't know that the change had been implemented at all. This change will let the user know which key (and potentially delimiter) caused an InvalidWriteError and also adds a note in the 3.14 whatsnew so that users will know about the previous change.

@lincolnj1 lincolnj1 requested a review from jaraco as a code owner June 15, 2025 02:56
@lincolnj1 lincolnj1 changed the title gh- 65697: Improved error msg for configparser key validation and added note in … gh- 65697: Improved error msg for configparser key validation Jun 15, 2025
@lincolnj1 lincolnj1 changed the title gh- 65697: Improved error msg for configparser key validation gh-65697: Improved error msg for configparser key validation Jun 15, 2025
@jaraco jaraco added 3.14 bugs and security fixes needs backport to 3.14 bugs and security fixes and removed 3.14 bugs and security fixes labels Jun 15, 2025
@jaraco
Copy link
Member

jaraco commented Jun 15, 2025

Nicely done. Thanks.

@jaraco jaraco merged commit 81237fb into python:main Jun 15, 2025
49 checks passed
@miss-islington-app
Copy link

Thanks @lincolnj1 for the PR, and @jaraco for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2025
…ythonGH-135527)

* Improved error msg for configparser key validation and added note in 3.14 whatsnew

* Properly added change to configparser

* 📜🤖 Added by blurb_it.

---------
(cherry picked from commit 81237fb)

Co-authored-by: Jacob Austin Lincoln <99031153+lincolnj1@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 15, 2025

GH-135541 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 15, 2025
jaraco pushed a commit that referenced this pull request Jun 15, 2025
…H-135527) (#135541)

gh-65697: Improved error msg for configparser key validation (GH-135527)

* Improved error msg for configparser key validation and added note in 3.14 whatsnew

* Properly added change to configparser

* 📜🤖 Added by blurb_it.

---------
(cherry picked from commit 81237fb)

Co-authored-by: Jacob Austin Lincoln <99031153+lincolnj1@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
shuimu5418 pushed a commit to shuimu5418/cpython001 that referenced this pull request Jun 16, 2025
…ython#135527)

* Improved error msg for configparser key validation and added note in 3.14 whatsnew

* Properly added change to configparser

* 📜🤖 Added by blurb_it.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
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.

2 participants