# HG changeset patch # User Sylvain Thénault # Date 1342776694 -7200 # Node ID 8de41063d629d29886b2d3fd37bc387d833a66d4 # Parent 4c1efb5bde0a31d4e1698bcd2cb89966b6f92377 [web login] fix after login redirection: redirect expect an url not a relative path. Breaks on cases like '?vid=aview'. Closes #2423575 diff -r 4c1efb5bde0a -r 8de41063d629 web/views/basecontrollers.py --- a/web/views/basecontrollers.py Fri Jul 20 10:57:48 2012 +0200 +++ b/web/views/basecontrollers.py Fri Jul 20 11:31:34 2012 +0200 @@ -91,7 +91,9 @@ def publish(self, rset=None): """log in the instance""" path = self._cw.form.get('postlogin_path', '.') - raise Redirect(path) + # redirect expect an url, not a path. Also path may contains a query + # string, hence should not be given to _cw.build_url() + raise Redirect(self._cw.base_url() + path) class LogoutController(Controller): diff -r 4c1efb5bde0a -r 8de41063d629 web/views/basetemplates.py --- a/web/views/basetemplates.py Fri Jul 20 10:57:48 2012 +0200 +++ b/web/views/basetemplates.py Fri Jul 20 11:31:34 2012 +0200 @@ -449,7 +449,7 @@ def form_action(self): if self.action is None: - # reuse existing redirection if it exist + # reuse existing redirection if it exists target = self._cw.form.get('postlogin_path', self._cw.relative_path()) url_args = {}