Skip to content

Commit e62db7a

Browse files
datlechinpaulbalandan
authored andcommitted
wip
1 parent 4b4c8bc commit e62db7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

system/Security/Security.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,10 @@ private function getPostedToken(RequestInterface $request): ?string
310310
return is_string($tokenValue) ? $tokenValue : null;
311311
}
312312

313-
if ($request->hasHeader($this->config->headerName)
314-
&& $request->header($this->config->headerName)->getValue() !== ''
315-
&& $request->header($this->config->headerName)->getValue() !== []) {
316-
return $request->header($this->config->headerName)->getValue();
313+
if ($request->hasHeader($this->config->headerName)) {
314+
$tokenValue = $request->header($this->config->headerName)->getValue();
315+
316+
return ($tokenValue !== '' && $tokenValue !== [] && is_string($tokenValue)) ? $tokenValue : null;
317317
}
318318

319319
$body = (string) $request->getBody();

0 commit comments

Comments
 (0)