diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-01-29 09:12:11 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-02-04 12:42:35 +0000 |
| commit | de590816d8d06730d99499db9a068f8d0e2cd3f9 (patch) | |
| tree | a138df14693c2f76614e76cd26a8fcf34d0df631 /addons/web/controllers/main.py | |
| parent | eae19fc2cd3496d4b59e4d8029fcceb5eaa3a561 (diff) | |
[FIX] *: deprecated access to url_ utilities through werkzeug root
In 0.15 accessing werkzeug.urls functions directly through werkzeug
is deprecated, the shortcut will be removed in the eventual werkzeug
1.0.
Fix existing uses of these shortcuts. Also cleanup some imports when
they're not far from a werkzeug* import being altered.
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 798077daf40..cdc43a07c6e 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -26,7 +26,7 @@ import werkzeug.utils import werkzeug.wrappers import werkzeug.wsgi from collections import OrderedDict, defaultdict, Counter -from werkzeug.urls import url_decode, iri_to_uri +from werkzeug.urls import url_encode, url_decode, iri_to_uri from lxml import etree import unicodedata @@ -1257,7 +1257,7 @@ class Session(http.Controller): 'state': json.dumps({'d': request.db, 'u': ICP.get_param('web.base.url')}), 'scope': 'userinfo', } - return 'https://accounts.odoo.com/oauth2/auth?' + werkzeug.url_encode(params) + return 'https://accounts.odoo.com/oauth2/auth?' + url_encode(params) @http.route('/web/session/destroy', type='json', auth="user") def destroy(self): |
