Skip to content

Commit

Permalink
fix: ensure csrf token is string
Browse files Browse the repository at this point in the history
  • Loading branch information
datlechin authored Jan 3, 2025
1 parent 3c851f1 commit f427948
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions system/Security/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ private function getPostedToken(RequestInterface $request): ?string
// Does the token exist in POST, HEADER or optionally php:://input - json data or PUT, DELETE, PATCH - raw data.

if ($tokenValue = $request->getPost($this->config->tokenName)) {
if (! is_string($tokenValue)) {
return null;
}

return $tokenValue;
}

Expand Down

0 comments on commit f427948

Please sign in to comment.