# HG changeset patch # User paulb # Date 1169146725 0 # Node ID fa9328f513ee54f9ba79b01171f837afc1c15029 # Parent 6b673bfae3c3de72e4fa92a005d9e1f1f54de31b [project @ 2007-01-18 18:58:45 by paulb] Fixed field processing, re-adding the get_fields_from_body call, fixing the call to the authenticator, and making the password field use the appropriate type. diff -r 6b673bfae3c3 -r fa9328f513ee WebStack/Resources/Login.py --- a/WebStack/Resources/Login.py Sun Jan 14 16:40:32 2007 +0000 +++ b/WebStack/Resources/Login.py Thu Jan 18 18:58:45 2007 +0000 @@ -4,7 +4,7 @@ Login resources which redirect clients back to an application after a successful login. -Copyright (C) 2004, 2005 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -55,8 +55,10 @@ # Check for a submitted login form. + fields_body = trans.get_fields_from_body(self.encoding) + if fields_body.has_key("login"): - if self.authenticator.authenticate(trans, fields_body.get("username"), fields_body.get("password")): + if self.authenticator.authenticate(trans, fields_body.get("username", [None])[0], fields_body.get("password", [None])[0]): self._redirect(trans, app, path, qs) # The above method does not return. @@ -97,7 +99,7 @@

Login

Username:

-

Password:

+

Password: