support CIDR for whitelist
Signed-off-by: Xerxes-2 <dspxue@gmail.com>
This commit is contained in:
parent
1591e0cfe7
commit
cf721e9bb3
5 changed files with 39 additions and 3 deletions
|
|
@ -395,7 +395,7 @@ class MyIdMenu: Reactor.Component {
|
|||
if (value) {
|
||||
var values = value.split(/[\s,;\n]+/g);
|
||||
for (var ip in values) {
|
||||
if (!ip.match(/^\d+\.\d+\.\d+\.\d+$/)) {
|
||||
if (!ip.match(/^\d+\.\d+\.\d+\.\d+(\/\d+)?$/)) {
|
||||
return translate("Invalid IP") + ": " + ip;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue