users : don't allow colon (:) in fields

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2278 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-09-12 15:54:06 +00:00
parent 93bf0cf482
commit 6c43b65a8c

View File

@@ -72,6 +72,10 @@ class users
throw new Exception (dgettext("domframework",
"Invalid email provided : too short"),
500);
if (strpos ($lastname, ":") !== false)
throw new Exception (dgettext("domframework",
"Invalid email provided : colon forbidden"),
500);
return true;
}
@@ -86,6 +90,10 @@ class users
throw new Exception (dgettext("domframework",
"Invalid firstname provided : too short"),
500);
if (strpos ($firstname, ":") !== false)
throw new Exception (dgettext("domframework",
"Invalid firstname provided : colon forbidden"),
500);
return true;
}
@@ -96,6 +104,10 @@ class users
throw new Exception (dgettext("domframework",
"Invalid lastname provided : not a string"),
500);
if (strpos ($lastname, ":") !== false)
throw new Exception (dgettext("domframework",
"Invalid lastname provided : colon forbidden"),
500);
return true;
}