Skip to content

Commit

Permalink
Update save_api_key.php
Browse files Browse the repository at this point in the history
  • Loading branch information
cowpod committed Nov 12, 2024
1 parent 24120c7 commit 1e0170b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions functions/save_api_key.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
if (!empty($api_key) && !ctype_alnum($api_key)) {
die('{"status":"error", "message":"invalid api_key provided"}');
}
if (strlen($api_key)!=32) {
die('{"status":"error", "message":"invalid api_key provided"}');
}

if (isset($_SESSION['api_key']) && $_SESSION['api_key']==$api_key) {
die('{"status":"succ", "message":"api_key is the same"}');
Expand Down

0 comments on commit 1e0170b

Please sign in to comment.