[FIX] http: avoid crash on jsonp POST+GET

- This commit fixes a crash that happens when the server receive a
  JSON-P call done in two requests (a POST followed by a GET).

  The issue is due to the fact that when the first request is done (POST
  one) the member `params` is never initialized.

  This parameter is then used in the module `auth_signup` on an override
  of the method `dispatch` thus crashing the code.

  To avoid the crash, we now initialize `params`.

closes odoo/odoo#27369
This commit is contained in:
Toufik Benjaa
2018-11-21 10:09:10 +00:00
committed by Toufik Ben Jaa
parent dc23365048
commit 23a7b15276
+1
View File
@@ -578,6 +578,7 @@ class JsonRequest(WebRequest):
super(JsonRequest, self).__init__(*args)
self.jsonp_handler = None
self.params = {}
args = self.httprequest.args
jsonp = args.get('jsonp')