# HG changeset patch # User Daniele Nicolodi # Date 1321010916 -3600 # Node ID 891229adcf666266591e80b0a2997f7fc2f120c5 # Parent 561585f470a4f4f88310f7e129cf403e4d989b62 Use correct path for redirect after login. diff -r 561585f470a4 -r 891229adcf66 src/ltpdarepo/security.py --- a/src/ltpdarepo/security.py Fri Nov 11 12:15:01 2011 +0100 +++ b/src/ltpdarepo/security.py Fri Nov 11 12:28:36 2011 +0100 @@ -63,7 +63,9 @@ @wraps(func) def decorated(*args, **kwargs): if 'username' not in session: - target = request.path != '/' and request.path or None + target = None + if request.path != '/': + target = request.script_root + request.path return redirect(url_for('login', next=target)) if self.role not in g.identity.roles: abort(403)