Skip to content

Commit f427948

Browse files
author
Ngô Quốc Đạt
authored
fix: ensure csrf token is string
1 parent 3c851f1 commit f427948

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

system/Security/Security.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ private function getPostedToken(RequestInterface $request): ?string
307307
// Does the token exist in POST, HEADER or optionally php:://input - json data or PUT, DELETE, PATCH - raw data.
308308

309309
if ($tokenValue = $request->getPost($this->config->tokenName)) {
310+
if (! is_string($tokenValue)) {
311+
return null;
312+
}
313+
310314
return $tokenValue;
311315
}
312316

0 commit comments

Comments
 (0)