diff options
-rw-r--r-- | lib/class/api.class.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 36c1c80c..397d5f19 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -120,10 +120,12 @@ class Api { // Clean incomming variables $user_id = Dba::escape($user_id); $timestamp = intval($timestamp); - $ip = Dba::escape(inet_pton($ip)); + $ip = inet_pton($ip); // Log this attempt debug_event('API','Login Attempt, IP:' . inet_ntop($ip) . ' Time:' . $timestamp . ' User:' . $username . '(' . $user_id . ') Auth:' . $passphrase,'1'); + + $ip = Dba::escape($ip); // Run the query and return the passphrases as we'll have to mangle them // to figure out if they match what we've got |