summaryrefslogtreecommitdiff
path: root/addons/auth_oauth
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-07-10 13:21:06 +0200
committerChristophe Simonis <chs@odoo.com>2018-07-10 13:21:06 +0200
commite354142ce742a96f8e7ba1d86a847a009d3fdfe6 (patch)
tree30debd9e770f687f7af60677b24c0db4e64fc825 /addons/auth_oauth
parent7384401e6365b9b00080154491cbbcc321d9719e (diff)
parentc22e479246e7c6fc22d50a6b0813f11795ba2e27 (diff)
[MERGE] forward port branch saas-15 up to c22e479246e
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 e231cd0f6d0..3b300070929 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: