Explorar o código

add protection

andre %!s(int64=4) %!d(string=hai) anos
pai
achega
54c0ec79b9
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      admin.php

+ 2 - 2
admin.php

@@ -35,13 +35,13 @@ if(isset($_GET['role'])) {
 if(isset($_GET['description'])) {
     $description = substr(trim($_GET['description']),0,40);
 }
-$clientIP = substr(trim($_SERVER['REMOTE_ADDR']),0,15);
+$clientIP = ip2long(substr(trim($_SERVER['REMOTE_ADDR']),0,15));
 $stats = true;
 
 $tok = new token;
 $act = new action;
 
-if($act->isBlocked(ip2long($clientIP))) {
+if($act->isBlocked($clientIP)) {
     http_response_code(403);
     exit;
 }