Version: 3.3.0
Bug Description
Form validation for received signal $presenter->getHttpRequest()->isFrom(Nette\Http\FetchSite::SameOrigin) fails if custom Request class is used. Calling isFrom is not possible on IRequest interface as it does not exist
|
} elseif (!$this->crossOrigin && !$presenter->getHttpRequest()->isFrom(Nette\Http\FetchSite::SameOrigin)) { |
|
$presenter->detectedCsrf(); |
|
|
Steps To Reproduce
For example PHPStan or just add custom class implementing https://github.com/nette/http/blob/master/src/Http/IRequest.php
Expected Behavior
Do not throw exception when for example Contributte\Codeception\Http\Request is used which does not have isFrom implemented
Possible Solution
add check with instanceof
Version: 3.3.0
Bug Description
Form validation for received signal
$presenter->getHttpRequest()->isFrom(Nette\Http\FetchSite::SameOrigin)fails if custom Request class is used. CallingisFromis not possible on IRequest interface as it does not existapplication/src/Application/UI/Form.php
Lines 144 to 146 in b670493
Steps To Reproduce
For example PHPStan or just add custom class implementing https://github.com/nette/http/blob/master/src/Http/IRequest.php
Expected Behavior
Do not throw exception when for example
Contributte\Codeception\Http\Requestis used which does not haveisFromimplementedPossible Solution
add check with
instanceof