Merge branch 'master-fatemi-05072018' into 'master-patch-july-2018'

Master fatemi 05072018

See merge request flectra-hq/flectra!108
This commit is contained in:
Parthiv Patel 2018-07-19 12:41:33 +00:00
commit b70f5ed3ab
2 changed files with 4 additions and 1 deletions

View File

@ -131,6 +131,8 @@ class OAuthController(http.Controller):
def signin(self, **kw): def signin(self, **kw):
state = json.loads(kw['state']) state = json.loads(kw['state'])
dbname = state['d'] dbname = state['d']
if not http.db_filter([dbname]):
return BadRequest()
provider = state['p'] provider = state['p']
context = state.get('c', {}) context = state.get('c', {})
registry = registry_get(dbname) registry = registry_get(dbname)
@ -180,6 +182,8 @@ class OAuthController(http.Controller):
dbname = db_monodb() dbname = db_monodb()
if not dbname: if not dbname:
return BadRequest() return BadRequest()
if not http.db_filter([dbname]):
return BadRequest()
registry = registry_get(dbname) registry = registry_get(dbname)
with registry.cursor() as cr: with registry.cursor() as cr:

View File

@ -42,7 +42,6 @@ class AuthSignupHome(Home):
template.sudo().with_context( template.sudo().with_context(
lang=user_sudo.lang, lang=user_sudo.lang,
auth_login=werkzeug.url_encode({'auth_login': user_sudo.email}), auth_login=werkzeug.url_encode({'auth_login': user_sudo.email}),
password=request.params.get('password')
).send_mail(user_sudo.id, force_send=True) ).send_mail(user_sudo.id, force_send=True)
return super(AuthSignupHome, self).web_login(*args, **kw) return super(AuthSignupHome, self).web_login(*args, **kw)
except UserError as e: except UserError as e: