This commit is contained in:
Raymond Hill 2023-10-29 23:44:43 -04:00
parent d110c21db7
commit c378d55dfb
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 9 additions and 6 deletions

View File

@ -3376,14 +3376,17 @@ function setCookie(
name = encodeURIComponent(name); name = encodeURIComponent(name);
const validValues = [ const validValues = [
'true', 'false', 'accept', 'reject',
'yes', 'y', 'no', 'n', 'accepted', 'rejected', 'notaccepted',
'allow', 'deny',
'allowed', 'disallow',
'enable', 'disable',
'enabled', 'disabled',
'ok', 'ok',
'accept', 'reject', 'rejected',
'allow', 'allowed', 'deny', 'disallow',
'on', 'off', 'on', 'off',
'accepted', 'notaccepted', 'true', 'false',
'enable', 'enabled', 'disable', 'disabled', 'y', 'n',
'yes', 'no',
]; ];
if ( validValues.includes(value.toLowerCase()) === false ) { if ( validValues.includes(value.toLowerCase()) === false ) {
if ( /^\d+$/.test(value) === false ) { return; } if ( /^\d+$/.test(value) === false ) { return; }