Skip to content

Commit

Permalink
We need to hash the input to compare it to a hash
Browse files Browse the repository at this point in the history
  • Loading branch information
silasary committed Jan 27, 2024
1 parent aa93906 commit 1e97300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gatherling/api_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function auth()
if (is_null($player)) {
return "Can't find a user called $username";
}
if ($player->api_key == $apikey) {
if ($player->api_key == hash('sha256', $apikey)) {
$_SESSION['username'] = $player->name;
} else {
return 'Invalid API Key';
Expand Down

0 comments on commit 1e97300

Please sign in to comment.