Skip to content

Commit

Permalink
[protector] fix problem of uri longer than 255 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed May 27, 2014
1 parent 62455d4 commit eeb26ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xoops_trust_path/modules/protector/class/protector.php
Expand Up @@ -808,7 +808,7 @@ function check_dos_attack( $uid = 0 , $can_ban = false )
$ip = @$_SERVER['REMOTE_ADDR'] ;
$uri = @$_SERVER['REQUEST_URI'] ;
$ip4sql = addslashes( $ip ) ;
$uri4sql = addslashes( $uri ) ;
$uri4sql = addslashes( substr( $uri , 0 , 255 ) );
if( empty( $ip ) || $ip == '' ) return true ;

// gargage collection
Expand Down Expand Up @@ -931,7 +931,7 @@ function check_brute_force()
$ip = @$_SERVER['REMOTE_ADDR'] ;
$uri = @$_SERVER['REQUEST_URI'] ;
$ip4sql = addslashes( $ip ) ;
$uri4sql = addslashes( $uri ) ;
$uri4sql = addslashes( substr( $uri , 0 , 255 ) );
if( empty( $ip ) || $ip == '' ) return true ;

$victim_uname = empty( $_COOKIE['autologin_uname'] ) ? $_POST['uname'] : $_COOKIE['autologin_uname'] ;
Expand Down

0 comments on commit eeb26ff

Please sign in to comment.