Respond 401 not 404 when bad request token
This commit is contained in:
parent
9ca5f97e65
commit
9515128b8a
|
@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa
|
||||||
|
|
||||||
This project follows [Semantic Versioning](http://semver.org) guidelines.
|
This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||||
|
|
||||||
|
## v0.6.4 (Courageous Carniadactylus)
|
||||||
|
### Changed
|
||||||
|
* Panel API for Daemon now responds with a `HTTP/401 Unauthorized` error when unable to locate a node with a given authentication token, rather than a `HTTP/404 Not Found` response.
|
||||||
|
|
||||||
## v0.6.3 (Courageous Carniadactylus)
|
## v0.6.3 (Courageous Carniadactylus)
|
||||||
### Fixed
|
### Fixed
|
||||||
* **[Security]** — Addresses an oversight in how the terminal rendered information sent from the server feed which allowed a malicious user to execute arbitrary commands on the game-server process itself by using a specifically crafted in-game command.
|
* **[Security]** — Addresses an oversight in how the terminal rendered information sent from the server feed which allowed a malicious user to execute arbitrary commands on the game-server process itself by using a specifically crafted in-game command.
|
||||||
|
|
|
@ -76,7 +76,7 @@ class DaemonAuthenticate
|
||||||
|
|
||||||
$node = Node::where('daemonSecret', $request->header('X-Access-Node'))->first();
|
$node = Node::where('daemonSecret', $request->header('X-Access-Node'))->first();
|
||||||
if (! $node) {
|
if (! $node) {
|
||||||
return abort(404);
|
return abort(401);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|
Loading…
Reference in New Issue