# HG changeset patch # User Christophe de Vienne # Date 1407150392 -7200 # Node ID 79ce84750c181bbb617e0a3353d72b1670abfdcb # Parent 00e5cb9771c59d23632b73ae3f458abc7c3bfcc3 If the postlogin_path is 'login', redirect to '/' instead Related to #4291173 diff -r 00e5cb9771c5 -r 79ce84750c18 pyramid_cubicweb/login.py --- a/pyramid_cubicweb/login.py Mon Aug 04 13:04:19 2014 +0200 +++ b/pyramid_cubicweb/login.py Mon Aug 04 13:06:32 2014 +0200 @@ -26,11 +26,12 @@ if user_eid is not None: headers = security.remember(request, user_eid) - raise HTTPSeeOther( - request.params.get('postlogin_path', '/'), - headers=headers) + new_path = request.params.get('postlogin_path', '/') - response.headerlist.extend(headers) + if new_path == 'login': + new_path = '/' + + raise HTTPSeeOther(new_path, headers=headers) response.text = render_view(request, 'login') return response