summaryrefslogtreecommitdiff
path: root/addons/web/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/controllers/main.py')
-rw-r--r--addons/web/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 3aa01cff047..1eacdbf0942 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -101,7 +101,7 @@ def ensure_db(redirect='/web/database/selector'):
# If the db is taken out of a query parameter, it will be checked against
# `http.db_filter()` in order to ensure it's legit and thus avoid db
# forgering that could lead to xss attacks.
- db = request.params.get('db')
+ db = request.params.get('db') and request.params.get('db').strip()
# Ensure db is legit
if db and db not in http.db_filter([db]):