Skip to content

Commit

Permalink
[security] ensure session is only for that request when authenticatin…
Browse files Browse the repository at this point in the history
…g user API key

GHSA-7v3x-h7r2-34jv
  • Loading branch information
DaneEveritt committed Jan 20, 2022
1 parent 21f74a8 commit dfa329d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* Fixes missing validation of Egg Author email addresses during the setup process that could cause unexpected failures later on.
* Fixes font rendering issues of the console on Firefox due to an outdated version of xterm.js being used.
* Fixes display overlap issues of the two-factor configuration form in a user's settings.
* **[security]** When authenticating using an API key a user session is now only persisted for the duration of the request before being destroyed.

### Changed
* CPU graph changed to show the maximum amount of CPU available to a server to better match how the memory graph is displayed.
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/Api/AuthenticateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function handle(Request $request, Closure $next, int $keyType)
} else {
$model = $this->authenticateApiKey($request->bearerToken(), $keyType);

$this->auth->guard()->loginUsingId($model->user_id);
$this->auth->guard()->onceUsingId($model->user_id);
}

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

0 comments on commit dfa329d

Please sign in to comment.