api: add workaround to disable OTP
This commit is contained in:
parent
4e70344bbf
commit
02cd6de128
|
@ -14,6 +14,8 @@
|
|||
require_once "db-prefs.php";
|
||||
require_once "functions.php";
|
||||
|
||||
define('AUTH_DISABLE_OTP', true);
|
||||
|
||||
if (defined('ENABLE_GZIP_OUTPUT') && ENABLE_GZIP_OUTPUT &&
|
||||
function_exists("ob_gzhandler")) {
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ class Auth_Internal extends Auth_Base {
|
|||
$otp = db_escape_string($_REQUEST["otp"]);
|
||||
|
||||
if (get_schema_version($this->link) > 96) {
|
||||
if (!defined('AUTH_DISABLE_OTP') || !AUTH_DISABLE_OTP) {
|
||||
$result = db_query($this->link, "SELECT otp_enabled,salt FROM ttrss_users WHERE
|
||||
login = '$login'");
|
||||
|
||||
|
@ -50,6 +51,7 @@ class Auth_Internal extends Auth_Base {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (get_schema_version($this->link) > 87) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue