summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b6cf2a5)
Some login plugins use form based authentication and let the user retry
on authentication errors. This is fine, however the wrong error code is
returned in this case, 401 should be returned.
Fixes: https://fedorahosted.org/ipsilon/ticket/94
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Nathan Kinder <nkinder@redhat.com>
error_password=not password,
error_username=not username
)
error_password=not password,
error_username=not username
)
+ self.lm.set_auth_error()
# pylint: disable=star-args
return self._template(self.formtemplate, **context)
# pylint: disable=star-args
return self._template(self.formtemplate, **context)
error_password=not password,
error_username=not username
)
error_password=not password,
error_username=not username
)
+ self.lm.set_auth_error()
# pylint: disable=star-args
return self._template('login/form.html', **context)
# pylint: disable=star-args
return self._template('login/form.html', **context)
error_password=not password,
error_username=not username
)
error_password=not password,
error_username=not username
)
+ self.lm.set_auth_error()
# pylint: disable=star-args
return self._template('login/form.html', **context)
# pylint: disable=star-args
return self._template('login/form.html', **context)
error_password=not password,
error_username=not username
)
error_password=not password,
error_username=not username
)
+ self.lm.set_auth_error()
# pylint: disable=star-args
return self._template('login/form.html', **context)
# pylint: disable=star-args
return self._template('login/form.html', **context)
raise cherrypy.HTTPRedirect(transdata['login_return'])
raise cherrypy.HTTPRedirect(transdata['login_return'])
+ def set_auth_error(self):
+ cherrypy.response.status = 401
+
def get_tree(self, site):
raise NotImplementedError
def get_tree(self, site):
raise NotImplementedError