mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-23 19:08:22 -06:00
8fe6ac7fb9
* refactor(matrix): retire pre-2026.4 legacy crypto and flat-storage migrations * refactor(cli): drop pre-tsdown daemon-cli dist compat shim from the build * refactor(diffs): remove deprecated image*/format tool params and output aliases * refactor(ui): drop pre-gateway-scoped localStorage readers and legacy theme map * refactor: remove assorted pre-2026.4 compat shims and deprecated aliases * fix(discord): map legacy thread-binding fields in the doctor JSON import * fix(msteams): keep bot read fallback for legacy imported conversation rows * test(msteams): cover legacy bot-only imported conversation references * fix(ui): keep channel-prefixed session key display fallback * chore: refresh native i18n inventory and build-docker step count * chore(matrix): drop now-unused migration-config module * chore: re-pin plugin SDK public export budget after compat removals * chore: refresh native i18n inventory after rebase * chore: re-pin plugin SDK callable budget and refresh i18n inventory after rebase
14 lines
494 B
TypeScript
14 lines
494 B
TypeScript
// Network Policy module implements ipv4 behavior.
|
|
import { isCanonicalDottedDecimalIPv4 } from "./ip.js";
|
|
|
|
/** Validates the custom-bind IPv4 input and returns the user-facing error text. */
|
|
export function validateDottedDecimalIPv4Input(value: string | undefined): string | undefined {
|
|
if (!value) {
|
|
return "IP address is required for custom bind mode";
|
|
}
|
|
if (isCanonicalDottedDecimalIPv4(value)) {
|
|
return undefined;
|
|
}
|
|
return "Invalid IPv4 address (e.g., 192.168.1.100)";
|
|
}
|