|
|
@@ -176,7 +176,8 @@ function CHECK_USER(&$err){
|
|
|
|
|
|
// Save request username and API key.
|
|
|
$r_user = $_REQUEST['u'];
|
|
|
- $r_key = $_REQUEST['k'];
|
|
|
+ $r_key = urldecode($_REQUEST['k']);
|
|
|
+ // $r_key = $_REQUEST['k'];
|
|
|
|
|
|
// Fetch user database and check the username and API key combination.
|
|
|
$users = GET_JSON_DATA_FROM_FILE(USERS_JSON);
|
|
|
@@ -189,7 +190,12 @@ function CHECK_USER(&$err){
|
|
|
|
|
|
if ($users[$r_user]['enabled']){
|
|
|
|
|
|
- if (ARE_STRINGS_EQUAL($r_key, $users[$r_user]['api_key'], FORCE_CASE_SENSITIVE_API_KEYS)){
|
|
|
+ $api_key = $users[$r_user]['api_key'];
|
|
|
+
|
|
|
+ // echo "r=" . $r_key . "|a=" . $api_key;
|
|
|
+ // exit(0);
|
|
|
+
|
|
|
+ if (ARE_STRINGS_EQUAL(urlencode($r_key), urlencode($api_key), FORCE_CASE_SENSITIVE_API_KEYS)){
|
|
|
// ALL USER CHECKS PASS.
|
|
|
return true;
|
|
|
}
|