Explorar el Código

debug blacklist

stany.ferer hace 3 meses
padre
commit
84927c36d9
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      core/class/blacklist.class.php

+ 4 - 1
core/class/blacklist.class.php

@@ -78,12 +78,15 @@ class blacklist {
                 echo "Votre IP est : " . $ip . ". Nombre de tentatives récentes : " . (count($recent_attempts) + 1);
                 exit();
             }
+        } else {
+            echo json_encode(["Error 404"]);
+            exit();
         }
     }
 
     public static function itIs(){ // Est-il blacklisté
         $ip = $_SERVER['REMOTE_ADDR'];
-        if(!self::checkBlacklist($ip)){
+        if(self::checkBlacklist($ip)){
             echo "Votre IP (" . $ip . ") a été blacklistée pour trop de tentatives.";
             exit();
         }