diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-18 15:16:02 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-18 15:16:02 +0000 |
commit | 77bc16f52520efe50ea0664b11f235897239a482 (patch) | |
tree | d970ed863bec575a335c98e4457879218f864d46 /lib/class/api.class.php | |
parent | 698f05d14f880eb4ec7866ec3a8416ee4d1f838f (diff) | |
download | ampache-77bc16f52520efe50ea0664b11f235897239a482.tar.gz ampache-77bc16f52520efe50ea0664b11f235897239a482.tar.bz2 ampache-77bc16f52520efe50ea0664b11f235897239a482.zip |
fixed dbl negative on xml api and enabled the timestamp check as well as fixed a typo in the config file
Diffstat (limited to 'lib/class/api.class.php')
-rw-r--r-- | lib/class/api.class.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/class/api.class.php b/lib/class/api.class.php index 40cff61f..c7391837 100644 --- a/lib/class/api.class.php +++ b/lib/class/api.class.php @@ -48,12 +48,13 @@ class Api { public static function handshake($timestamp,$passphrase,$ip,$username='') { // If the timestamp is over 2hr old sucks to be them -// if ($timestamp < (time() - 7200)) { -// return 'Timestamp too old, try again'; -// } + if ($timestamp < (time() - 14400)) { + debug_event('API','Login Failed, timestamp too old','1'); + return false; + } // First we'll filter by username and IP - if (!$username) { + if (!trim($username)) { $user_id = '-1'; } else { |