]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - Classes/class-paneluser.php
Shut up some errors
[irc/unrealircd/unrealircd-webpanel.git] / Classes / class-paneluser.php
index 1757e30bdb81b3ec626833ed8a22916c2a87f4c1..d6350f0b4546fc2596d2e9235ecc02a49431c304 100644 (file)
@@ -201,6 +201,8 @@ class PanelUser
         */
        function HIBP($password_hash)
        {
         */
        function HIBP($password_hash)
        {
+               if (get_config("hibp") == false)
+                       return;
                $url = "https://api.pwnedpasswords.com/range/".substr($password_hash,0,5);
                $end = substr($password_hash,5);
                $ch = curl_init($url);
                $url = "https://api.pwnedpasswords.com/range/".substr($password_hash,0,5);
                $end = substr($password_hash,5);
                $ch = curl_init($url);
@@ -221,10 +223,8 @@ class PanelUser
                foreach($data as $dat)
                {
                        $result = explode(":",$dat);
                foreach($data as $dat)
                {
                        $result = explode(":",$dat);
-                       error_log("Checking $i of $count: ".substr($result[0],0,5)." => ".substr(strtoupper($end), 0,5));
                        if ($result[0] == strtoupper($end))
                        {
                        if ($result[0] == strtoupper($end))
                        {
-                               error_log("FOUND");
                                $this->add_meta("hibp", $result[1]);
                                return;
                        }
                                $this->add_meta("hibp", $result[1]);
                                return;
                        }