Permalink
Browse files

[protector] fix problem of uri longer than 255 characters

  • Loading branch information...
nao-pon committed May 27, 2014
1 parent 62455d4 commit eeb26ff155d5daaee902b4f9391ed66e132915ca
Showing with 2 additions and 2 deletions.
  1. +2 −2 xoops_trust_path/modules/protector/class/protector.php
@@ -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
@@ -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'] ;

0 comments on commit eeb26ff

Please sign in to comment.