Commit 7bca2933 authored by Leigh Stoller's avatar Leigh Stoller

Add regexs for the Full Name field to prevent odd characters from

getting into the system.
parent 8b23d335
......@@ -373,6 +373,9 @@ if (! $returning) {
strcmp($formfields[usr_name], "") == 0) {
$errors["Full Name"] = "Missing Field";
}
elseif (! preg_match("/^[-\w\. ]*$/", $formfields[usr_name])) {
$errors["Full Name"] = "Invalid characters";
}
if (!isset($formfields[usr_affil]) ||
strcmp($formfields[usr_affil], "") == 0) {
$errors["Affiliation"] = "Missing Field";
......
......@@ -532,6 +532,9 @@ if (! $returning) {
strcmp($formfields[usr_name], "") == 0) {
$errors["Full Name"] = "Missing Field";
}
elseif (! preg_match("/^[-\w\. ]*$/", $formfields[usr_name])) {
$errors["Full Name"] = "Invalid characters";
}
if (!isset($formfields[usr_affil]) ||
strcmp($formfields[usr_affil], "") == 0) {
$errors["Affiliation"] = "Missing Field";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment