From 7a79c0c5d952aec8c3641f37d77a97a9454c4cb7 Mon Sep 17 00:00:00 2001 From: Fatemi Lokhandwala Date: Thu, 19 Jul 2018 16:58:13 +0530 Subject: [PATCH] [ADD]:Added Upstream Patch for auth_oauth --- addons/auth_oauth/controllers/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index da1b7d53..d2c90798 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: