diff --git a/src/backend/security/authorization/roles.py b/src/backend/security/authorization/roles.py index 6710b4f46..37bf0ef6b 100644 --- a/src/backend/security/authorization/roles.py +++ b/src/backend/security/authorization/roles.py @@ -239,7 +239,7 @@ class Role(models.TextChoices): "delete": [Role.ADMIN, Role.AUDITOR, Role.READER], }, "httpheader": { - "view": [Role.ADMIN, Role.AUDITOR], + "view": [Role.ADMIN, Role.AUDITOR, Role.READER], "add": [Role.ADMIN, Role.AUDITOR], "change": [Role.ADMIN, Role.AUDITOR], "delete": [Role.ADMIN, Role.AUDITOR], diff --git a/src/backend/security/validators/input_validator.py b/src/backend/security/validators/input_validator.py index 71c36b3ed..1024e7ef4 100644 --- a/src/backend/security/validators/input_validator.py +++ b/src/backend/security/validators/input_validator.py @@ -21,7 +21,7 @@ class Regex(Enum): PATH_WITH_QUERYPARAMS = r"[\w\.\-_/\\#?&%$]{0,500}" CVE = r"CVE-\d{4}-\d{1,7}" SECRET = r"[\w\s\./\-=\+,:<>¿?¡!#&$()@%\[\]\{\}\*]{1,500}" - INJECTION = r"[;\"&$]+" + INJECTION = r"[;\"'&<>$]+" class Validator(RegexValidator): diff --git a/src/frontend/components/http-header/form.vue b/src/frontend/components/http-header/form.vue index d993c1fe4..061c4063f 100644 --- a/src/frontend/components/http-header/form.vue +++ b/src/frontend/components/http-header/form.vue @@ -14,6 +14,7 @@ (k) => !!k || 'Header key is required', (k) => validate.name.test(k.trim()) || 'Header key is invalid', ]" + :readonly="autz.isAuditor()" @update:model-value="disabled = false" /> @@ -28,11 +29,13 @@ (v) => !!v || 'Header value is required', (v) => validate.text.test(v.trim()) || 'Header value is invalid', ]" + :readonly="autz.isAuditor()" @update:model-value="disabled = false" >