From 9b8d212ef24a038c2a92697e337c4de9bdbde2a0 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 17 Mar 2009 15:12:04 +0000 Subject: escape after log entry and ptoning --- lib/class/api.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/class/api.class.php') 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 -- cgit