]> git.wh0rd.org - tt-rss.git/commitdiff
Check if the auth module supports check_password() method before using it
authorBenjamin Collet <ben@clt.tf>
Thu, 14 Dec 2017 17:02:37 +0000 (18:02 +0100)
committerBenjamin Collet <ben@clt.tf>
Thu, 14 Dec 2017 17:02:37 +0000 (18:02 +0100)
classes/pref/prefs.php

index 50d20490a1a6cf96e7eff1a256c11150d0d8b33d..7a61b6f19c15a2ea1b214b5edc2d8936d2068a33 100644 (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 "";
        }
-}
\ No newline at end of file
+}