added IP check
This commit is contained in:
parent
32121ac142
commit
10b5d8c640
|
@ -488,6 +488,9 @@ function get_preg($argument, $regexp) {
|
||||||
break;
|
break;
|
||||||
case 'domainSID': // Samba domain SID
|
case 'domainSID': // Samba domain SID
|
||||||
$pregexpr = "/^S\\-[0-9]\\-[0-9]\\-[0-9]{2,2}\\-[0-9]+\\-[0-9]+\\-[0-9]+$/";
|
$pregexpr = "/^S\\-[0-9]\\-[0-9]\\-[0-9]{2,2}\\-[0-9]+\\-[0-9]+\\-[0-9]+$/";
|
||||||
|
case 'ip': // IP address
|
||||||
|
$pregexpr = '/^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}$/';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if ($pregexpr!='')
|
if ($pregexpr!='')
|
||||||
if (preg_match($pregexpr, $argument)) {
|
if (preg_match($pregexpr, $argument)) {
|
||||||
|
|
Loading…
Reference in New Issue