mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
Adding a string length restriction so cookie names can't be set to improper values
This commit is contained in:
parent
0dd33e06d7
commit
cdc0b3e7fe
1 changed files with 3 additions and 2 deletions
|
|
@ -124,8 +124,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
|||
}
|
||||
|
||||
if (!empty($pconfig['session_name'])) {
|
||||
if (!ctype_alnum($pconfig['session_name'])) {
|
||||
$input_errors[] = gettext('Session name must be alphanumeric only.');
|
||||
$session_name_len = strlen($pconfig['session_name']);
|
||||
if (!ctype_alnum($pconfig['session_name']) || $session_name_len < 3 || $session_name_len > 32) {
|
||||
$input_errors[] = gettext('Session name must be between 3 and 32 alphanumeric characters only.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue