[FIX] http: avoid corruption with domain name

Domain names may have been interpreted as a regex by mistake
This commit is contained in:
Martin Trigaux
2018-07-18 10:32:42 +02:00
parent 7501691da9
commit 4e4dd4dfa2
+1
View File
@@ -1523,6 +1523,7 @@ def db_filter(dbs, httprequest=None):
if d == "www" and r:
d = r.partition('.')[0]
if odoo.tools.config['dbfilter']:
d, h = re.escape(d), re.escape(h)
r = odoo.tools.config['dbfilter'].replace('%h', h).replace('%d', d)
dbs = [i for i in dbs if re.match(r, i)]
elif odoo.tools.config['db_name']: