mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 07:22:44 +00:00
fix(security): enforce strict IPv4 SSRF literal handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user