Params/Fixup
* FILTER_SANITIZE_URL is absurdly strict and will not tolerate umlauts or spaces replaced with printable chars regex
This commit is contained in:
parent
9b905883df
commit
be3701df91
5 changed files with 14 additions and 14 deletions
|
|
@ -25,7 +25,7 @@ class AccountresetpasswordResponse extends TemplateResponse
|
|||
|
||||
protected array $expectedGET = array(
|
||||
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[a-zA-Z0-9]{40}$/']],
|
||||
'next' => ['filter' => FILTER_SANITIZE_URL, 'flags' => FILTER_FLAG_STRIP_AOWOW ]
|
||||
'next' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/' ]]
|
||||
);
|
||||
protected array $expectedPOST = array(
|
||||
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[a-zA-Z0-9]{40}$/']],
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class AccountSigninResponse extends TemplateResponse
|
|||
);
|
||||
protected array $expectedGET = array(
|
||||
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[a-zA-Z0-9]{40}$/']],
|
||||
'next' => ['filter' => FILTER_SANITIZE_URL, 'flags' => FILTER_FLAG_STRIP_AOWOW ]
|
||||
'next' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/'] ]
|
||||
);
|
||||
|
||||
private bool $success = false;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ class AccountSignoutResponse extends TextResponse
|
|||
use TrGetNext;
|
||||
|
||||
protected array $expectedGET = array(
|
||||
'next' => ['filter' => FILTER_SANITIZE_URL, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH],
|
||||
'global' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkEmptySet'] ]
|
||||
'next' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/']],
|
||||
'global' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkEmptySet'] ]
|
||||
);
|
||||
|
||||
public function __construct(string $pageParam)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class AccountSignupResponse extends TemplateResponse
|
|||
);
|
||||
|
||||
protected array $expectedGET = array(
|
||||
'next' => ['filter' => FILTER_SANITIZE_URL, 'flags' => FILTER_FLAG_STRIP_AOWOW]
|
||||
'next' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/']]
|
||||
);
|
||||
|
||||
private bool $success = false;
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@ if (!defined('AOWOW_REVISION'))
|
|||
class ContactusBaseResponse extends TextResponse
|
||||
{
|
||||
protected array $expectedPOST = array(
|
||||
'mode' => ['filter' => FILTER_VALIDATE_INT ],
|
||||
'reason' => ['filter' => FILTER_VALIDATE_INT ],
|
||||
'ua' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine']],
|
||||
'appname' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine']],
|
||||
'page' => ['filter' => FILTER_SANITIZE_URL ],
|
||||
'desc' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextBlob']],
|
||||
'id' => ['filter' => FILTER_VALIDATE_INT ],
|
||||
'relatedurl' => ['filter' => FILTER_SANITIZE_URL ],
|
||||
'email' => ['filter' => FILTER_SANITIZE_EMAIL ]
|
||||
'mode' => ['filter' => FILTER_VALIDATE_INT ],
|
||||
'reason' => ['filter' => FILTER_VALIDATE_INT ],
|
||||
'ua' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine'] ],
|
||||
'appname' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine'] ],
|
||||
'page' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/']],
|
||||
'desc' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextBlob'] ],
|
||||
'id' => ['filter' => FILTER_VALIDATE_INT ],
|
||||
'relatedurl' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/']],
|
||||
'email' => ['filter' => FILTER_SANITIZE_EMAIL ]
|
||||
);
|
||||
|
||||
/* responses
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue