[New-bugs-announce] [issue33721] os.path.exists() ought to return False if pathname contains NUL

pacujo report at bugs.python.org
Thu May 31 13:19:25 EDT 2018


New submission from pacujo <marko at pacujo.net>:

os.path.exists() returns True or False for all imaginable string arguments except for one that contains NUL ("\0") (Linux). This behavior is not documented in the library. Moreover, it can easily lead to accidents if  an externally supplied pathname were to contain a NUL because most test suites would not try to cover such a pathname.

I propose os.path.exists() should return False even in this case.

----------
components: Library (Lib)
messages: 318334
nosy: pacujo
priority: normal
severity: normal
status: open
title: os.path.exists() ought to return False if pathname contains NUL
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33721>
_______________________________________


More information about the New-bugs-announce mailing list