fix: incorrect syntax

This commit is contained in:
James Elliott 2022-05-10 22:37:03 +10:00
parent b9e0dfb82c
commit 6e7fe8354b
No known key found for this signature in database
GPG Key ID: 0F1C4A096E857E49
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ location ^~ /authelia {
location = /authelia/api/verify {
internal;
if ($request_uri ~ [^a-zA-Z0-9_+-=\!@$%&*?~.:#'\;\(\)\[\]])\{\} {
if ($request_uri ~ [^a-zA-Z0-9_+-=\!@$%&*?~.:#'\;\(\)\[\]\{\}]) {
return 401;
}
include /config/nginx/resolver.conf;

View File

@ -109,7 +109,7 @@ fi
# patch authelia-server.conf for CVE-2021-32637
if ! grep -q 'if ($request_uri ~' /config/nginx/authelia-server.conf; then
sed -i '/internal;/a \ \ \ \ if ($request_uri ~ [^a-zA-Z0-9_+-=\\!@$%&*?~.:#'\''\\;\\(\\)\\[\\]])\\{\\} { return 401; }' /config/nginx/authelia-server.conf
sed -i '/internal;/a \ \ \ \ if ($request_uri ~ [^a-zA-Z0-9_+-=\\!@$%&*?~.:#'\''\\;\\(\\)\\[\\]\\{\\}]) { return 401; }' /config/nginx/authelia-server.conf
fi
# copy pre-generated dhparams or generate if needed