mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
This commit is contained in:
commit
8270a2c209
4 changed files with 61 additions and 6 deletions
|
|
@ -22,6 +22,14 @@ the Unix :program:`ftp` program and other FTP clients.
|
|||
no argument is given, the file :file:`.netrc` in the user's home directory will
|
||||
be read. Parse errors will raise :exc:`NetrcParseError` with diagnostic
|
||||
information including the file name, line number, and terminating token.
|
||||
If no argument is specified on a POSIX system, the presence of passwords in
|
||||
the :file:`.netrc` file will raise a :exc:`NetrcParseError` if the file
|
||||
ownership or permissions are insecure (owned by a user other than the user
|
||||
running the process, or accessible for read or write by any other user).
|
||||
This implements security behavior equivalent to that of ftp and other
|
||||
programs that use :file:`.netrc`.
|
||||
|
||||
.. versionchanged:: 3.2.6 Added the POSIX permission check.
|
||||
|
||||
|
||||
.. exception:: NetrcParseError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue