Skip to content

[3.14] gh-138514: getpass: restrict echo_char to a single ASCII character (GH-138591) - #138988

Merged
hugovk merged 1 commit into
python:3.14from
miss-islington:backport-ab6893a-3.14
Sep 17, 2025
Merged

hugovk merged 1 commit into
python:3.14from
miss-islington:backport-ab6893a-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 16, 2025 •

Copy link
Copy Markdown
Contributor

This amends commit bf8bbe9 by
restricting echo_char in getpass.getpass to single printable
ASCII characters as it would be uncommon to use long strings or
multi-byte characters for keyboard feedback.


(cherry picked from commit ab6893a)

Co-authored-by: Benjamin Johnson benjohnson2040@gmail.com
Co-authored-by: Bénédikt Tran 10796600+picnixz@users.noreply.github.com
Co-authored-by: Brian Schubert brianm.schubert@gmail.com


📚 Documentation preview 📚: https://cpython-previews--138988.org.readthedocs.build/

…acter (pythonGH-138591)

This amends commit bf8bbe9 by
restricting `echo_char` in `getpass.getpass` to single printable
ASCII characters as it would be uncommon to use long strings or
multi-byte characters for keyboard feedback.

---------
(cherry picked from commit ab6893a)

Co-authored-by: Benjamin Johnson <benjohnson2040@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
@hugovk
hugovk merged commit 37f8a63 into python:3.14 Sep 17, 2025
@miss-islington
miss-islington deleted the backport-ab6893a-3.14 branch January 2, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants