less restrictive input checks
This commit is contained in:
parent
91f9e62456
commit
659437af53
|
@ -465,8 +465,8 @@ function get_preg($argument, $regexp) {
|
||||||
case 'hostname': // first character must be letter, last must be $. Only normal letters, numbers and ._- are allowed
|
case 'hostname': // first character must be letter, last must be $. Only normal letters, numbers and ._- are allowed
|
||||||
$pregexpr = '/^[a-zA-Z]([a-zA-Z0-9\\.\\_-])*\\$$/u';
|
$pregexpr = '/^[a-zA-Z]([a-zA-Z0-9\\.\\_-])*\\$$/u';
|
||||||
break;
|
break;
|
||||||
case 'realname': // Allow all letters, space and .-_
|
case 'realname': // Allow all but \, <, >, =, $, ?
|
||||||
$pregexpr = '/^[[:alnum:]]([[:alnum:]\\.\\ \\_-])*$/u';
|
$pregexpr = '/^[^\\\<>=\\$\\?]+$/';
|
||||||
break;
|
break;
|
||||||
case "telephone": // Allow numbers, space, brackets, /-+.
|
case "telephone": // Allow numbers, space, brackets, /-+.
|
||||||
$pregexpr = '/^(\\+)*([0-9\\.\\ \\(\\)\\/-])*$/';
|
$pregexpr = '/^(\\+)*([0-9\\.\\ \\(\\)\\/-])*$/';
|
||||||
|
@ -477,14 +477,12 @@ function get_preg($argument, $regexp) {
|
||||||
case "mailLocalAddress":
|
case "mailLocalAddress":
|
||||||
$pregexpr = '/^([0-9a-z\\._-])+([@]([0-9a-z-])+([.]([0-9a-z-])+)*)?$/';
|
$pregexpr = '/^([0-9a-z\\._-])+([@]([0-9a-z-])+([.]([0-9a-z-])+)*)?$/';
|
||||||
break;
|
break;
|
||||||
case "street": // Allow all letters, numbers, space and .-_
|
case "postalAddress": // Allow all but \, <, >, =, $, ?
|
||||||
$pregexpr = '/^([[:alnum:]\\.\\ \\_-])*$/u';
|
case "postalCode":
|
||||||
break;
|
case "street":
|
||||||
case "postalAddress": // Allow all letters, numbers, space and .-_
|
case "title":
|
||||||
case "postalCode": // Allow all letters, numbers, space and .-_
|
case "employeeType":
|
||||||
case "title": // Allow all letters, numbers, space and .-_
|
$pregexpr = '/^[^\\\<>=\\$\\?]*$/';
|
||||||
case "employeeType": // Allow all letters, numbers, space and .-_
|
|
||||||
$pregexpr = '/^([[:alnum:]\\.\\ \\_-])*$/u';
|
|
||||||
break;
|
break;
|
||||||
case "homeDirectory": // Homapath, /path/......
|
case "homeDirectory": // Homapath, /path/......
|
||||||
$pregexpr = '/^([\/]([[:alnum:]\\$\\.\\ \\_-])+)+$/u';
|
$pregexpr = '/^([\/]([[:alnum:]\\$\\.\\ \\_-])+)+$/u';
|
||||||
|
|
Loading…
Reference in New Issue