Fix showed path in 'bind_public_ip' message

This commit is contained in:
OniriCorpe 2024-03-11 03:40:09 +01:00 committed by Bram
parent f940b415c1
commit 2e4e5cf37e

View file

@ -1584,10 +1584,11 @@ class Configurations(TestSuite):
for ip in re.split("[ \t,='\"(){}\[\]]", line): for ip in re.split("[ \t,='\"(){}\[\]]", line):
if ip == "::" or ip.startswith("0.0.0.0"): if ip == "::" or ip.startswith("0.0.0.0"):
yield Info( yield Info(
f"{os.path.join(path, filename)}:{number}: Binding to '0.0.0.0' or '::' can result " f"{os.path.relpath(path, app.path)}:{number}: "
"in a security issue as the reverse proxy and the SSO can be " "Binding to '0.0.0.0' or '::' can result in a security issue "
"bypassed by knowing a public IP (typically an IPv6) and the " "as the reverse proxy and the SSO can be bypassed by knowing "
"app port. lease be sure that this behavior is intentional. " "a public IP (typically an IPv6) and the app port. "
"Please be sure that this behavior is intentional. "
"Maybe use '127.0.0.1' or '::1' instead." "Maybe use '127.0.0.1' or '::1' instead."
) )