]> git.wh0rd.org - tt-rss.git/commitdiff
api: properly handle incorrect UID passed to login
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 28 Jul 2010 10:32:09 +0000 (14:32 +0400)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 28 Jul 2010 10:32:09 +0000 (14:32 +0400)
api/index.php

index 64e9741a38036ab23f821f88903a7766e05bcec5..8d69e1a7351bd63383b3372fceafa9384fda1e52 100644 (file)
@@ -61,7 +61,7 @@
                                $uid = 0;
                        }
 
-                       if (get_pref($link, "ENABLE_API_ACCESS", $uid)) {
+                       if ($uid && get_pref($link, "ENABLE_API_ACCESS", $uid)) {
                                if (authenticate_user($link, $login, $password)) {
                                        print json_encode(array("session_id" => session_id()));
                                } else {