Laravel version update
Laravel version update
This commit is contained in:
10
vendor/zendframework/zend-validator/src/Csrf.php
vendored
10
vendor/zendframework/zend-validator/src/Csrf.php
vendored
@@ -82,7 +82,7 @@ class Csrf extends AbstractValidator
|
||||
$options = ArrayUtils::iteratorToArray($options);
|
||||
}
|
||||
|
||||
if (!is_array($options)) {
|
||||
if (! is_array($options)) {
|
||||
$options = (array) $options;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,11 @@ class Csrf extends AbstractValidator
|
||||
*/
|
||||
public function isValid($value, $context = null)
|
||||
{
|
||||
$this->setValue((string) $value);
|
||||
if (! is_string($value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->setValue($value);
|
||||
|
||||
$tokenId = $this->getTokenIdFromHash($value);
|
||||
$hash = $this->getValidationToken($tokenId);
|
||||
@@ -124,7 +128,7 @@ class Csrf extends AbstractValidator
|
||||
$tokenFromValue = $this->getTokenFromHash($value);
|
||||
$tokenFromHash = $this->getTokenFromHash($hash);
|
||||
|
||||
if (!$tokenFromValue || !$tokenFromHash || ($tokenFromValue !== $tokenFromHash)) {
|
||||
if (! $tokenFromValue || ! $tokenFromHash || ($tokenFromValue !== $tokenFromHash)) {
|
||||
$this->error(self::NOT_SAME);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user