Mercurial > libervia-web
changeset 1061:bacb8f229742
pages: fixed unicode escaping when using a redirecting URL
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 11 Mar 2018 19:28:10 +0100 |
parents | f0f7b3324749 |
children | c80649cdadd5 |
files | src/server/pages.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/server/pages.py Sun Mar 11 19:26:18 2018 +0100 +++ b/src/server/pages.py Sun Mar 11 19:28:10 2018 +0100 @@ -778,7 +778,6 @@ @param request(server.Request): current HTTP request @param url(unicode): url to redirect to """ - web_util.redirectTo(url.encode('utf-8'), request) request.finish() raise failure.Failure(exceptions.CancelError(u'HTTP redirection is used')) @@ -793,8 +792,8 @@ @interrupt pageError(C.HTTP_BAD_REQUEST): empty or non local URL is used """ try: - url = self.getPostedData(request, 'redirect_url') - except KeyError: + url = request.args['redirect_url'][0] + except (KeyError, IndexError): pass else: # a redirection is requested @@ -1022,6 +1021,7 @@ @return (iterator[unicode], list[iterator[unicode], unicode, list[unicode]): values received for this(these) key(s) @raise KeyError: one specific key has been requested, and it is missing """ + # FIXME: request.args is already unquoting the value, it seems we are doing double unquote if isinstance(keys, basestring): keys = [keys] get_first = True