fix: update regex for cookie flags validation to allow additional attributes

This commit is contained in:
Théophile Diot 2024-12-04 11:01:34 +01:00
parent 114175a5d1
commit 7c71fe32f0
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -48,7 +48,7 @@
"help": "Cookie flags automatically added to all cookies (value accepted for nginx_cookie_flag_module).",
"id": "cookie-flags",
"label": "Cookie flags",
"regex": "^(\\*|[^;]+)?( (HttpOnly|(SameSite)(?!.*\\4)(=(Lax|Strict))?)(?!.*\\3))*$",
"regex": "^(\\*|[^\\s;]+)?(\\s*(([Ee]xpires)(?!.*\\4)=[^\\s;]+|([Dd]omain)(?!.*\\5)=[^\\s;]+|([Pp]ath)(?!.*\\6)=[^\\s;]+|[Hh]ttp[Oo]nly|[Ss]ame[Ss]ite(=([Ll]ax|[Ss]trict|[NN]one))?|[Ss]ecure)(?!.*\\3))*$",
"type": "text",
"multiple": "cookie-flags"
},