We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ab67334 + 2aa104a commit 5cfe9b1Copy full SHA for 5cfe9b1
1 file changed
lib/User/Backend.php
@@ -235,6 +235,10 @@ public function getCurrentUserId(): string {
235
236
// get the bearer token from headers
237
$headerToken = $this->request->getHeader(Application::OIDC_API_REQ_HEADER);
238
+ if (!str_starts_with($headerToken, 'bearer ') && !str_starts_with($headerToken, 'Bearer ')) {
239
+ $this->logger->debug('No Bearer token');
240
+ return '';
241
+ }
242
$headerToken = preg_replace('/^bearer\s+/i', '', $headerToken);
243
if ($headerToken === '') {
244
$this->logger->debug('No Bearer token');
0 commit comments