From 1aa87ccaeb0d6bec0996e0519f861399b82e95df Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Mon, 2 Jan 2023 14:37:56 +0000 Subject: [PATCH] API Key error wording --- api/v1/validate_api_key.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1/validate_api_key.php b/api/v1/validate_api_key.php index 5b85055e..fa3646a8 100644 --- a/api/v1/validate_api_key.php +++ b/api/v1/validate_api_key.php @@ -73,10 +73,10 @@ if (isset($api_key)) { if (mysqli_num_rows($sql) !== 1) { // Invalid Key header(WORDING_UNAUTHORIZED); - mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'API', log_action = 'Failed', log_description = 'Incorrect or expired Key', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW()"); + mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'API', log_action = 'Failed', log_description = 'Incorrect or expired key', log_ip = '$ip', log_user_agent = '$user_agent', log_created_at = NOW()"); $return_arr['success'] = "False"; - $return_arr['message'] = "API Key authentication failure or expired."; + $return_arr['message'] = "Authentication failed. API key is invalid or has expired."; header(WORDING_UNAUTHORIZED); echo json_encode($return_arr);