bug session_auth tool and url ending with "login_screen"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

bug session_auth tool and url ending with "login_screen"

"Fabien =?UTF-8?Q?Ch=C3=A9reau" ?=
Hi, I'm having a problem using the session_auth tool:
it seems to me that the url ending with "login_screen" doesn't work as
described in the doc. They should normally display the login form
page, but in my case (SVN version) it display a blank page.

The problem seems to come from cptools.py, in the method run from
SessionAuth class, I would change:
if path.endswith('login_screen'):
            return self.login_screen(**request.params)

into

if path.endswith('login_screen'):
            cherrypy.response.body =
self.login_screen(**request.params)
            return True



my workaround for using current version is to add the following in my
code:

def session_auth_run_fix(self):
    request = cherrypy.request
    path = request.path_info
    if path.endswith('login_screen'):
        cherrypy.response.body = self.login_screen(**request.params)
        return True
    elif path.endswith('do_login'):
        return self.do_login(**request.params)
    elif path.endswith('do_logout'):
        return self.do_logout(**request.params)
    else:
        return self.do_check()

import cherrypy.lib.cptools
cherrypy.lib.cptools.SessionAuth.run = session_auth_run_fix

Regards,
Fabien

--
You received this message because you are subscribed to the Google Groups "cherrypy-devel" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/cherrypy-devel?hl=en.