1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-20 20:51:29 +00:00

add placeholder authentication via app passwords if service is passed

forbid logins via regular passwords for services
remove AUTH_DISABLE_OTP
This commit is contained in:
Andrew Dolgov
2019-11-01 13:03:06 +03:00
parent 88cd9e586e
commit 68b0380118
6 changed files with 160 additions and 143 deletions

View File

@@ -509,7 +509,7 @@
return "";
}
function authenticate_user($login, $password, $check_only = false) {
function authenticate_user($login, $password, $check_only = false, $service = false) {
if (!SINGLE_USER_MODE) {
$user_id = false;
@@ -517,7 +517,7 @@
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_AUTH_USER) as $plugin) {
$user_id = (int) $plugin->authenticate($login, $password);
$user_id = (int) $plugin->authenticate($login, $password, $service);
if ($user_id) {
$auth_module = strtolower(get_class($plugin));