summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-01-27 12:27:27 +0400
committerAndrew Dolgov <[email protected]>2012-01-27 12:27:27 +0400
commit5081319e23daad80694701866e7aa0297f02ca53 (patch)
treee1f509c569806bb21444a07ba1dd23e5663b89c6
parent9de4bb4898b25126bfb1554ec970e79f2b2ec0d0 (diff)
authenticate_user: check for missing login when selecting salt
-rw-r--r--include/functions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php
index 3ace20f86..44331d72e 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -715,6 +715,10 @@
$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 == "") {