optionpool.py: Make jinja autoescape rules explicit
Description
This is part of #1220 - the linter thinks invoking jinja2
without auto-escape rules is dangerous. Probably not a bad lint, but entirely pointless in our case.
Nonetheless, we should probably set up some default so it's explicit that we don't want escaping.
Merge request reports
Activity
@BenjaminSchubert looks like freedesktop-sdk loads (though it complains because not all plugins are available, shouldn't be an issue for this change).
Do you mind the bit of function aliasing I've resorted to?
added 1 commit
- eab55380 - optionpool.py: Make jinja autoescape rules explicit
added 1 commit
- 2d1cfa69 - optionpool.py: Make jinja autoescape rules explicit
added 1 commit
- 21fb72d3 - optionpool.py: Make jinja autoescape rules explicit
added 3 commits
-
21fb72d3...c35a8eb8 - 2 commits from branch
master
- 24e35924 - optionpool.py: Make jinja autoescape rules explicit
-
21fb72d3...c35a8eb8 - 2 commits from branch
I considered that, but I prefer a change for two reasons:
- Even if silenced, the vulnerability will appear in our list, just
strike through, which doesn't look as good; especially considering the remaining large number of minor issues. - It's good to be explicit about this anyway, we don't want the default to change or have someone expect it to escape XSS-vulnerable markup languages by default.
The change is anyway rather small, if annoyingly... unwieldy, so I don't think it hurts.
Edited by Tristan Maat- Even if silenced, the vulnerability will appear in our list, just
added 1 commit
- 30131784 - optionpool.py: Make jinja autoescape rules explicit
mentioned in merge request !1763 (merged)
added 1 commit
- 1a3164cb - optionpool.py: Make jinja autoescape rules explicit
added 76 commits
-
1a3164cb...397a8fe5 - 75 commits from branch
master
- a0f0fe64 - optionpool.py: Make jinja autoescape rules explicit
-
1a3164cb...397a8fe5 - 75 commits from branch