]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-74616: Raise ValueError in case of null character in input prompt (GH-1738)
authorKushal Das <mail@kushaldas.in>
Thu, 7 Dec 2023 10:22:52 +0000 (11:22 +0100)
committerGitHub <noreply@github.com>
Thu, 7 Dec 2023 10:22:52 +0000 (10:22 +0000)
commit4ba15de19153bb97308996ec85242bdeda358387
treed0d59d4ead8ea7e225ea578e4b4f50755c1fee4e
parent8660fb7fd7cdcbfe58ef304f5720efe97ca7c842
gh-74616: Raise ValueError in case of null character in input prompt (GH-1738)

If the input prompt to the builtin input function on terminal has any null
character, then raise ValueError instead of silently truncating it.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_builtin.py
Misc/NEWS.d/next/Core and Builtins/2023-12-07-12-00-04.gh-issue-74616.kgTGVb.rst [new file with mode: 0644]
Python/bltinmodule.c