Fix delimiteur for regex in preg_match

This commit is contained in:
Victor LABORIE 2017-10-11 13:33:08 +02:00
parent 419b14993a
commit 89dc9a9633
2 changed files with 5 additions and 5 deletions

View file

@ -24,7 +24,7 @@ class Auth
function badname($login)
{
return (!preg_match('`^([a-z0-9][a-z0-9\-\.\_]{1,28}[a-z0-9])$`',$login));
return (!preg_match('/^([a-z0-9][a-z0-9\-\.\_]{1,28}[a-z0-9])$/',$login));
}
/**
@ -37,7 +37,7 @@ class Auth
{
return ( (strlen($pass) > 42) ||
(strlen($pass) < 5) ||
(!preg_match('^([[:graph:]]*)$',$pass)) );
(!preg_match('/^([[:graph:]]*)$/',$pass)) );
}
@ -47,7 +47,7 @@ class Auth
function badfqdn($domain)
{
return (!preg_match('^([[:alnum:]\.\-]{2,70}.[[:alpha:]]{2,5})$',$domain));
return (!preg_match('/^([[:alnum:]\.\-]{2,70}.[[:alpha:]]{2,5})$/',$domain));
}
}

View file

@ -236,7 +236,7 @@ function getsambagroups($type) {
*/
function badname($login)
{
return (!preg_match('`^([a-z0-9][a-z0-9\-\.\_]{0,28}[a-z0-9])$`',$login));
return (!preg_match('/^([a-z0-9][a-z0-9\-\.\_]{0,28}[a-z0-9])$/',$login));
}
/**
@ -244,7 +244,7 @@ function badname($login)
*/
function adddomain(&$item,$key)
{
if (preg_match('`@`',$item)) {
if (preg_match('/@/',$item)) {
print "<p class='error'>Ne pas inclure de @ dans les mails acceptes&nbsp;!</p>";
exit(1);
}