mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
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:
@@ -25,7 +25,7 @@ class AccountresetpasswordResponse extends TemplateResponse
|
|||||||
|
|
||||||
protected array $expectedGET = array(
|
protected array $expectedGET = array(
|
||||||
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[a-zA-Z0-9]{40}$/']],
|
'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(
|
protected array $expectedPOST = array(
|
||||||
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[a-zA-Z0-9]{40}$/']],
|
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[a-zA-Z0-9]{40}$/']],
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class AccountSigninResponse extends TemplateResponse
|
|||||||
);
|
);
|
||||||
protected array $expectedGET = array(
|
protected array $expectedGET = array(
|
||||||
'key' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[a-zA-Z0-9]{40}$/']],
|
'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;
|
private bool $success = false;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class AccountSignoutResponse extends TextResponse
|
|||||||
use TrGetNext;
|
use TrGetNext;
|
||||||
|
|
||||||
protected array $expectedGET = array(
|
protected array $expectedGET = array(
|
||||||
'next' => ['filter' => FILTER_SANITIZE_URL, 'flags' => FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH],
|
'next' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/']],
|
||||||
'global' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkEmptySet'] ]
|
'global' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkEmptySet'] ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class AccountSignupResponse extends TemplateResponse
|
|||||||
);
|
);
|
||||||
|
|
||||||
protected array $expectedGET = array(
|
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;
|
private bool $success = false;
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ class ContactusBaseResponse extends TextResponse
|
|||||||
'reason' => ['filter' => FILTER_VALIDATE_INT ],
|
'reason' => ['filter' => FILTER_VALIDATE_INT ],
|
||||||
'ua' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine'] ],
|
'ua' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine'] ],
|
||||||
'appname' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine'] ],
|
'appname' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextLine'] ],
|
||||||
'page' => ['filter' => FILTER_SANITIZE_URL ],
|
'page' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/']],
|
||||||
'desc' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextBlob'] ],
|
'desc' => ['filter' => FILTER_CALLBACK, 'options' => [self::class, 'checkTextBlob'] ],
|
||||||
'id' => ['filter' => FILTER_VALIDATE_INT ],
|
'id' => ['filter' => FILTER_VALIDATE_INT ],
|
||||||
'relatedurl' => ['filter' => FILTER_SANITIZE_URL ],
|
'relatedurl' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^[[:print:]]+$/']],
|
||||||
'email' => ['filter' => FILTER_SANITIZE_EMAIL ]
|
'email' => ['filter' => FILTER_SANITIZE_EMAIL ]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user