summaryrefslogtreecommitdiff
path: root/addons/auth_oauth
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-07-10 11:30:59 +0200
committerChristophe Simonis <chs@odoo.com>2018-07-10 11:30:59 +0200
commit5d8076c842f62d23e7ebcbbf73f57ef263833b0b (patch)
treeb95bed04d507318ea893f1e755358d3db9c60ad1 /addons/auth_oauth
parent5fc392e34a85900e1bb6b3f2a169f1226ab87827 (diff)
parent5e682451cbcb15cbc2ebcfe35545e60912b76f1a (diff)
[MERGE] forward port branch 10.0 up to 5e682451cbc
Diffstat (limited to 'addons/auth_oauth')
-rw-r--r--addons/auth_oauth/controllers/main.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index a5a888f51a2..0e8270d7eed 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -131,6 +131,8 @@ class OAuthController(http.Controller):
def signin(self, **kw):
state = json.loads(kw['state'])
dbname = state['d']
+ if not http.db_filter([dbname]):
+ return BadRequest()
provider = state['p']
context = state.get('c', {})
registry = registry_get(dbname)
@@ -180,6 +182,8 @@ class OAuthController(http.Controller):
dbname = db_monodb()
if not dbname:
return BadRequest()
+ if not http.db_filter([dbname]):
+ return BadRequest()
registry = registry_get(dbname)
with registry.cursor() as cr: