LittleDevMars / pyftpdlib

Automatically exported from code.google.com/p/pyftpdlib
Other
0 stars 0 forks source link

validate_authentication description in tutorial is outdated #249

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This exception raises when you connect to the authenticator written previously.

    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/asyncore.py", line 83, in read
        obj.handle_read_event()
      File "/usr/local/lib/python2.7/asyncore.py", line 444, in handle_read_event
        self.handle_read()
      File "/usr/local/lib/python2.7/asynchat.py", line 158, in handle_read
        self.found_terminator()
      File "/usr/local/lib/python2.7/site-packages/pyftpdlib/handlers.py", line 1317, in found_terminator
        self.pre_process_command(line, cmd, arg)
      File "/usr/local/lib/python2.7/site-packages/pyftpdlib/handlers.py", line 1366, in pre_process_command
        self.process_command(cmd, arg)
      File "/usr/local/lib/python2.7/site-packages/pyftpdlib/handlers.py", line 1434, in process_command
        method(*args, **kwargs)
      File "/usr/local/lib/python2.7/site-packages/pyftpdlib/handlers.py", line 2377, in ftp_PASS
        self.authorizer.validate_authentication(self.username, line, self)
    TypeError: validate_authentication() takes exactly 3 arguments (4 given)

The problem is in the tutorial it shows the old version.
In new one you have to add a third arg - handler.

Original issue reported on code.google.com by equ...@gmail.com on 16 Apr 2013 at 11:35

GoogleCodeExporter commented 9 years ago
From:
https://code.google.com/p/pyftpdlib/wiki/Tutorial

validate_authentication(username, password, handler)
Raises AuthenticationFailed if the supplied username and password doesn't match 
the stored credentials.

I see nothing wrong here.

Original comment by g.rodola on 16 Apr 2013 at 11:54

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/pyftpdlib/wiki/Tutorial#4.3_-_Storing_passwords_as_has
h_digests

Original comment by equ...@gmail.com on 16 Apr 2013 at 12:01

GoogleCodeExporter commented 9 years ago
Fixed, thanks.

Original comment by g.rodola on 16 Apr 2013 at 1:13