]> git.wh0rd.org Git - tt-rss.git/commitdiff
authenticate_user: check for missing login when selecting salt
authorAndrew Dolgov <fox@fakecake.org>
Fri, 27 Jan 2012 08:27:27 +0000 (12:27 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Fri, 27 Jan 2012 08:27:27 +0000 (12:27 +0400)
include/functions.php

index 3ace20f86edd6955e439dac9a6831b82bc404082..44331d72e1c88090441a622051a639825d7a7b7f 100644 (file)
                                $result = db_query($link, "SELECT salt FROM ttrss_users WHERE
                                        login = '$login'");
 
+                               if (db_num_rows($result) != 1) {
+                                       return false;
+                               }
+
                                $salt = db_fetch_result($result, 0, "salt");
 
                                if ($salt == "") {