mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
The settings page took the posted theme name as it came and wrote it into the @import lines of wvc-main.scss and the compiled CSS: a name with "../" or a quote imported files outside the themes directory (CodeQL py/path-injection; the page is for superusers). The name must now be one of the directories in SASS_DIR/wvc-themes, the list the page already offers; anything else is refused with a message and nothing is written. themes_list is empty when SASS_DIR has no themes, so every name is refused then. Checked with the real dev/scss: flatly is applied and compiled as before, "../../etc" is refused and leaves the CSS alone. The test fails on the previous code. |
||
|---|---|---|
| .. | ||
| migrations | ||
| templates | ||
| __init__.py | ||
| apps.py | ||
| context_processors.py | ||
| middleware.py | ||
| models.py | ||
| settings.py | ||
| test_appsettings.py | ||
| test_theme_name.py | ||
| tests.py | ||
| views.py | ||