mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Added mac address validation on network policy whitelist
This commit is contained in:
parent
fccc47eb0d
commit
a4e84f5682
3 changed files with 17 additions and 6 deletions
|
|
@ -86,6 +86,12 @@ const validateURL = (url) => {
|
|||
return urlRegex.test(url);
|
||||
}
|
||||
|
||||
const validateMAC = (mac_address) => {
|
||||
const macRegex = new RegExp(regexes.mac_address)
|
||||
|
||||
return macRegex.test(mac_address);
|
||||
}
|
||||
|
||||
/* ****************************************************** */
|
||||
|
||||
const validatePortRange = (ports) => {
|
||||
|
|
@ -150,7 +156,8 @@ const regexValidation = function () {
|
|||
validatePortRange,
|
||||
validateSingleWord,
|
||||
validateURL,
|
||||
validateCIDR
|
||||
validateCIDR,
|
||||
validateMAC
|
||||
};
|
||||
}();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue