summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-09-18 00:32:54 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-09-18 00:32:54 (GMT)
commit8270a2c209836c49fb2909c3af6117c46439b86e (patch)
tree76f71c56f744f5aa050cf07b6f326029c6ce7097 /Doc
parent945a251e4ab8b4ebbb77604a64fa9b53b725ec6c (diff)
parent104aab956f6de4131cab800f742cc108f9f92edf (diff)
downloadcpython-8270a2c209836c49fb2909c3af6117c46439b86e.zip
cpython-8270a2c209836c49fb2909c3af6117c46439b86e.tar.gz
cpython-8270a2c209836c49fb2909c3af6117c46439b86e.tar.bz2
Merge #14984: On POSIX, enforce permissions when reading default .netrc.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/netrc.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst
index 3f38cbc..e085bce 100644
--- a/Doc/library/netrc.rst
+++ b/Doc/library/netrc.rst
@@ -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