summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-07-10 11:25:27 +0200
committerChristophe Simonis <chs@odoo.com>2018-07-10 11:25:27 +0200
commit5e682451cbcb15cbc2ebcfe35545e60912b76f1a (patch)
treee6d2aa5f6aa140ec311a0d2231b9b6b7ed6c8726 /addons/auth_oauth/controllers
parente08f999468a933ad73dc140e274107c992b5645c (diff)
parent8b25099aea6345c711eaff1d3363c47020653f99 (diff)
[MERGE] forward port branch 9.0 up to 8b25099aea6
Diffstat (limited to 'addons/auth_oauth/controllers')
-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: