1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 11:45:56 +00:00

Check if the auth module supports check_password() method before using it

This commit is contained in:
Benjamin Collet
2017-12-14 18:02:37 +01:00
parent 9390ddeae2
commit 44c6a04b61

View File

@@ -922,7 +922,7 @@ class Pref_Prefs extends Handler_Protected {
static function isdefaultpassword() {
$authenticator = PluginHost::getInstance()->get_plugin($_SESSION["auth_module"]);
if ($authenticator && $authenticator->check_password($_SESSION["uid"], "password")) {
if ($authenticator && function_exists($authenticator->check_password) $authenticator->check_password($_SESSION["uid"], "password")) {
return true;
}
@@ -1125,4 +1125,4 @@ class Pref_Prefs extends Handler_Protected {
return "";
}
}
}