diff --git a/system/Security/Security.php b/system/Security/Security.php index aeb8526cfdc0..4ba665639f36 100644 --- a/system/Security/Security.php +++ b/system/Security/Security.php @@ -348,7 +348,9 @@ private function getPostedToken(RequestInterface $request): ?string return $tokenValue; } - if ($request->hasHeader($this->config->headerName) && ! empty($request->header($this->config->headerName)->getValue())) { + if ($request->hasHeader($this->config->headerName) + && $request->header($this->config->headerName)->getValue() !== '' + && $request->header($this->config->headerName)->getValue() !== []) { return $request->header($this->config->headerName)->getValue(); }