diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-04-03 12:02:16 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-04-03 14:19:01 +0000 |
| commit | 4b7ac65e17f212a7a884948660364b2008c0f52d (patch) | |
| tree | 66f5c1ed932de091a1b8180007c6cda25467f296 /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | d2d1720525bd89fa84904bb64c35ba62c01e7dcf (diff) | |
[FIX] survey: use absolute paths
On redirection, werkzeug converts locations from relative to absolute
URLs. Apparently the specific algorithm when given a relative *path*
changed between 0.14 and 0.15, or possibly these paths suddenly became
processed whereas before they were interpreted as absolute?
So in Werkzeug 0.14, `redirect('foo/bar')` was treated as
`redirect('/foo/bar')` but in 0.15 it's first urljoin-ed to the
current path before the redirection is effected.
This is an issue with slides, because survey's get_start_url returns
the url `survey/start/<access_token>` without a leading slash.
The result is that where with 0.14 the certification tour would do this:
GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
GET /survey/start/<id>?answer_token=<token>
with 0.15 or above it does this:
GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
GET /slides_survey/slide/survey/start/<id>?answer_token=<token>
Which weirdly enough doesn't work at all.
closes odoo/odoo#48982
X-original-commit: 82a23883748172c05d2562f244ffbc1558ce01fc
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions
