forked from svrjs/svrjs
Fix bug in ipMatch function.
This commit is contained in:
parent
52484dab24
commit
eafc2f076e
1 changed files with 1 additions and 1 deletions
2
svr.js
2
svr.js
|
@ -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
|
||||
|
|
Reference in a new issue