Skip to content

Commit dfa329d

Browse files
committed
[security] ensure session is only for that request when authenticating user API key
GHSA-7v3x-h7r2-34jv
1 parent 21f74a8 commit dfa329d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1313
* Fixes missing validation of Egg Author email addresses during the setup process that could cause unexpected failures later on.
1414
* Fixes font rendering issues of the console on Firefox due to an outdated version of xterm.js being used.
1515
* Fixes display overlap issues of the two-factor configuration form in a user's settings.
16+
* **[security]** When authenticating using an API key a user session is now only persisted for the duration of the request before being destroyed.
1617

1718
### Changed
1819
* CPU graph changed to show the maximum amount of CPU available to a server to better match how the memory graph is displayed.

app/Http/Middleware/Api/AuthenticateKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function handle(Request $request, Closure $next, int $keyType)
7070
} else {
7171
$model = $this->authenticateApiKey($request->bearerToken(), $keyType);
7272

73-
$this->auth->guard()->loginUsingId($model->user_id);
73+
$this->auth->guard()->onceUsingId($model->user_id);
7474
}
7575

7676
$request->attributes->set('api_key', $model);

0 commit comments

Comments
 (0)