summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-07-10 12:22:55 +0200
committerChristophe Simonis <chs@odoo.com>2018-07-10 12:22:55 +0200
commitc22e479246e7c6fc22d50a6b0813f11795ba2e27 (patch)
treed9a179ff294e8a7ddd5d4689cf30541a8b7a5a65 /addons/auth_oauth/controllers
parentb06c09db604a580acc85eb75ce68f42880ba9b73 (diff)
parent5d8076c842f62d23e7ebcbbf73f57ef263833b0b (diff)
[MERGE] forward port branch saas-14 up to 5d8076c842f
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: