mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-21 18:21:30 +00:00
api/login: properly return LOGIN_ERROR when passed an invalid username
This commit is contained in:
@@ -80,7 +80,13 @@
|
|||||||
$uid = 0;
|
$uid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($uid && get_pref($link, "ENABLE_API_ACCESS", $uid)) {
|
if (!$uid) {
|
||||||
|
print api_wrap_reply(API_STATUS_ERR, $seq,
|
||||||
|
array("error" => "LOGIN_ERROR"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (get_pref($link, "ENABLE_API_ACCESS", $uid)) {
|
||||||
if (authenticate_user($link, $login, $password)) { // try login with normal password
|
if (authenticate_user($link, $login, $password)) { // try login with normal password
|
||||||
print api_wrap_reply(API_STATUS_OK, $seq,
|
print api_wrap_reply(API_STATUS_OK, $seq,
|
||||||
array("session_id" => session_id()));
|
array("session_id" => session_id()));
|
||||||
|
|||||||
Reference in New Issue
Block a user