mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
fix: reject leading zero probe IPv4
This commit is contained in:
@@ -26,6 +26,9 @@ const isValidProbeIPv4 = (host: string) => {
|
||||
if (!/^\d+$/.test(part)) {
|
||||
return false;
|
||||
}
|
||||
if (part.length > 1 && part.startsWith("0")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const value = Number(part);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user