1
0
Fork 0
forked from svrjs/svrjs

Fix bug in ipMatch function.

This commit is contained in:
Dorian Niemiec 2024-08-24 07:49:21 +02:00
parent 52484dab24
commit eafc2f076e

2
svr.js
View file

@ -547,7 +547,7 @@ function ipMatch(IP1, IP2) {
// Function to normalize IPv4 address (remove leading zeros)
function normalizeIPv4Address(address) {
return address.replace(/(^|\.)(?:0(?!\.|$))+/g, "");
return address.replace(/(^|\.)(?:0(?!\.|$))+/g, "$1");
}
// Function to expand IPv6 address to full format