mirror of
https://github.com/itflow-org/itflow
synced 2026-08-05 15:17:17 +00:00
Credential length guard
This commit is contained in:
@@ -2,6 +2,13 @@
|
||||
// Model of reusable variables for client credentials - not to be confused with the ITFLow login process
|
||||
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
|
||||
|
||||
// The form maxlength is client-side only - a hand-rolled POST gets here without it
|
||||
if ($credential_field_too_long = checkCredentialLengths($_POST)) {
|
||||
flashAlert("Credential <strong>$credential_field_too_long</strong> is too long to store", 'error');
|
||||
redirect();
|
||||
exit;
|
||||
}
|
||||
|
||||
$name = escapeSql($_POST['name']);
|
||||
$description = escapeSql($_POST['description']);
|
||||
$uri = escapeSql($_POST['uri']);
|
||||
|
||||
Reference in New Issue
Block a user