Skip to content

Commit

Permalink
core: mark dbpath as safe for Postfix maps
Browse files Browse the repository at this point in the history
When tests are using SQLite as database backend, the database name can
contain '&' which is escaped if `dbname` is unsafe.
  • Loading branch information
jeromelebleu authored and tonioo committed Jan 7, 2020
1 parent 6868654 commit c0aedd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modoboa/core/management/commands/generate_postfix_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_template(self, dbtype):
"""Return map file template."""
tplcontent = MAP_FILE_TEMPLATE
if dbtype == "sqlite":
tplcontent += """dbpath = {{ dbname }}
tplcontent += """dbpath = {{ dbname|safe }}
query = {{ query|safe }}
"""
else:
Expand Down

0 comments on commit c0aedd0

Please sign in to comment.