mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
SecurityMiddleware: Increase CSP parser tolerance
This commit is contained in:
@@ -139,8 +139,8 @@ class SecurityMiddleware:
|
||||
def _parse_csp(self, header):
|
||||
h = {}
|
||||
for part in header.split(';'):
|
||||
k, v = part.split(' ', 1)
|
||||
h[k] = v
|
||||
k, v = part.strip().split(' ', 1)
|
||||
h[k.strip()] = v
|
||||
return h
|
||||
|
||||
def _render_csp(self, h):
|
||||
|
||||
Reference in New Issue
Block a user