summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-12-28 20:54:28 (GMT)
committerGuido van Rossum <guido@python.org>2001-12-28 20:54:28 (GMT)
commitc33e077838c8fee729c726f59c441555847b07e6 (patch)
tree7ad1855e814fcaa9e7f0a0130680de9f574a5dc4 /Doc
parent556026967563ca59a0531bcb8a510dfc00a86635 (diff)
downloadcpython-c33e077838c8fee729c726f59c441555847b07e6.zip
cpython-c33e077838c8fee729c726f59c441555847b07e6.tar.gz
cpython-c33e077838c8fee729c726f59c441555847b07e6.tar.bz2
SF patch #497420 (Eduardo PĂ©rez): ftplib: ftp anonymous password
Instead of sending the real user and host, use "anonymous@" (i.e. no host name at all!) as the default anonymous FTP password. This avoids privacy violations.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libftplib.tex7
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/lib/libftplib.tex b/Doc/lib/libftplib.tex
index 0d0d700..d4851ab 100644
--- a/Doc/lib/libftplib.tex
+++ b/Doc/lib/libftplib.tex
@@ -20,7 +20,7 @@ Here's a sample session using the \module{ftplib} module:
\begin{verbatim}
>>> from ftplib import FTP
>>> ftp = FTP('ftp.cwi.nl') # connect to host, default port
->>> ftp.login() # user anonymous, passwd user@hostname
+>>> ftp.login() # user anonymous, passwd anonymous@
>>> ftp.retrlines('LIST') # list directory contents
total 24418
drwxrwsr-x 5 ftp-usr pdmaint 1536 Mar 20 09:48 .
@@ -121,10 +121,7 @@ Log in as the given \var{user}. The \var{passwd} and \var{acct}
parameters are optional and default to the empty string. If no
\var{user} is specified, it defaults to \code{'anonymous'}. If
\var{user} is \code{'anonymous'}, the default \var{passwd} is
-\samp{\var{realuser}@\var{host}} where \var{realuser} is the real user
-name (glanced from the \envvar{LOGNAME} or \envvar{USER} environment
-variable) and \var{host} is the hostname as returned by
-\function{socket.gethostname()}. This function should be called only
+\code{'anonymous@'}. This function should be called only
once for each instance, after a connection has been established; it
should not be called at all if a host and user were given when the
instance was created. Most FTP commands are only allowed after the