fix(security): enforce strict IPv4 SSRF literal handling

This commit is contained in:
Peter Steinberger
2026-02-19 15:24:03 +01:00
parent 77c748304b
commit 26c9b37f5b
6 changed files with 121 additions and 74 deletions

View File

@@ -1,4 +1,4 @@
export function validateIPv4AddressInput(value: string | undefined): string | undefined {
export function validateDottedDecimalIPv4Input(value: string | undefined): string | undefined {
if (!value) {
return "IP address is required for custom bind mode";
}
@@ -17,3 +17,8 @@ export function validateIPv4AddressInput(value: string | undefined): string | un
}
return "Invalid IPv4 address (each octet must be 0-255)";
}
// Backward-compatible alias for callers using the old helper name.
export function validateIPv4AddressInput(value: string | undefined): string | undefined {
return validateDottedDecimalIPv4Input(value);
}