-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Currently we do not allow for the http: scheme. We do not require https: (so a non defined URL scheme is also allowed):
See:
Internet.nl/tests/unittests/test_tasks_http_headers.py
Lines 106 to 108 in 5181fd0
| def test_default_src_5(self): | |
| headers = "default-src 'self' internet.nl *.internet.nl; frame-ancestors 'self'" | |
| self._is_good(headers) |
We might want to explicitly require the https: scheme.
See below mail discussion between SR, WK and BK (17 Oct 2022).
Hier wat achtergrond info over schemes (http:, https: of none):
https://csplite.com/csp87/#SOP
Daarin staat ook dat CSP2 en CSP3 net wat anders omgaan met "http:". Merk
trouwens op dat CSP3 formeel nog een Working Draft is (hoewel veel al in de
laatste versies van browsers lijkt te zijn geland) en CSP2 een Recommendation.Zoals we vanochtend ook bespraken, lijkt het het meest verstandig om https:
voor iedere in CSP opgenomen URL te plaatsen. Ook omdat het niet zeker is dat
een http-->https redirect voor het (hele) websitedomein incl. directories wordt
gebruikt.Zie ook nog wat relevante comments in een eerdere discussie over de
implementatie van de CSP-test:
#325 (comment)Laten we nagaan wat de Internet.nl-code nu doet (alleen "http:" afkeuren? of
ook "none" afkeuren en dus alleen "https:" toestaan?), en dan bepalen of we dit
willen aanpassen.