Revision ae0a369e
Added by Renato Botelho over 11 years ago
usr/local/www/system_certmanager.php | ||
---|---|---|
288 | 288 |
/* Make sure we do not have invalid characters in the fields for the certificate */ |
289 | 289 |
for ($i = 0; $i < count($reqdfields); $i++) { |
290 | 290 |
if (preg_match('/email/', $reqdfields[$i])){ /* dn_email or csr_dn_name */ |
291 |
if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["$reqdfields[$i]"]))
|
|
291 |
if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]]))
|
|
292 | 292 |
array_push($input_errors, "The field 'Distinguished name Email Address' contains invalid characters."); |
293 | 293 |
}else if (preg_match('/commonname/', $reqdfields[$i])){ /* dn_commonname or csr_dn_commonname */ |
294 |
if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["$reqdfields[$i]"]))
|
|
294 |
if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]]))
|
|
295 | 295 |
array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters."); |
296 |
}else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
|
|
296 |
}else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST[$reqdfields[$i]]))
|
|
297 | 297 |
array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters."); |
298 | 298 |
} |
299 | 299 |
|
Also available in: Unified diff
Remove unecessary quotes