diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-17 15:12:04 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2009-03-17 15:12:04 +0000 |
commit | 9b8d212ef24a038c2a92697e337c4de9bdbde2a0 (patch) | |
tree | ec4f360018127b1545bb617a1c78fff070bf9e65 | |
parent | e94245d814ef93ce36bf430abe77918ece260856 (diff) | |
download | ampache-9b8d212ef24a038c2a92697e337c4de9bdbde2a0.tar.gz ampache-9b8d212ef24a038c2a92697e337c4de9bdbde2a0.tar.bz2 ampache-9b8d212ef24a038c2a92697e337c4de9bdbde2a0.zip |
escape after log entry and ptoning
-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 |