From 124c37f6f86ed6461b727627cc3784afd8473099 Mon Sep 17 00:00:00 2001 From: josch Date: Sat, 16 Aug 2008 08:28:52 +0000 Subject: [PATCH] quickly sanitized account controller with plain error messages git-svn-id: http://yolanda.mister-muffin.de/svn@372 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/yolanda/controllers/account.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/trunk/yolanda/controllers/account.py b/trunk/yolanda/controllers/account.py index 1e6b838..11981ef 100644 --- a/trunk/yolanda/controllers/account.py +++ b/trunk/yolanda/controllers/account.py @@ -15,11 +15,11 @@ class AccountController(BaseController): self.consumer = Consumer(self.openid_session, None) openid = request.params.get('username', None) if openid is None: - return render('/login/form.mako') + return "invalid openid" try: authrequest = self.consumer.begin(openid) except DiscoveryFailure, e: - return render('/login/form.mako') + return "invalid openid" redirecturl = authrequest.redirectURL( h.url_for('',qualified=True), @@ -41,11 +41,10 @@ class AccountController(BaseController): session.clear() return redirect_to('/index') else: - return redirect_to('/login') + return "openid auth error" def logout(self): - c.title = 'logged out' session.clear() session.save() - return render('/login/logout.mako') + return redirect_to('/index')