Re: Security issues

From: Date: Wed, 14 Jan 2004 14:35:33 +0000
Subject: Re: Security issues
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-174551@lists.php.net to get a copy of this message
memoimyself@yahoo.com.br wrote:
Hi Chris, First of all, thanks a lot for sharing your "modus operandi" with us. On 14 Jan 2004 at 7:32, Chris W wrote:
I then verify that every character in the string is with in the ascii range of a space to the ~ which is basically all the characters on the key board.
How exactly are you performing this check? Regular expression matching? If so, what regular expression are you using?
function validStr($s, $len) { if(strlen($s) > $len){
    return false;
} for($i = 0;$i < strlen($S);$i++){
    if($s[$i] < ' ' or $s[$i] > '~'){
      return false;
    }
} return true; }

« previous php.general (#174551) next »