link.php does not verify if link is valid
Brought to you by:
yankidank
The link.php allows invalid links.
I added a check to see that you get at lease 20
characters back to declate a valid link.
Original:
if(!($this->html = $xxx)) {
return;
}
Fixed:
if(!($this->html = $xxx) || strlen($xxx) < 20) {
$this->valid = false;
return;
}
Added || strlen($xxx) < 20
And
$this->valid = false;
Fixed file
Logged In: NO
The correct fix is to change the code as follows:
if(!($this->html == $xxx)) {
$this->valid = false; return;
}
This will put the user back on the initial url entry page.
Logged In: YES
user_id=1440149
The solution to this problem that I implemented was:
[code]
function get($url) {
$url=trim($url);
if( !preg_match( '/^(http|https|ftp):\/\/[a-
z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}'
.'((:[0-9]{1,5})?\/.*)?$/i' ,$url))
{
$this->valid = false; return;
}
if( CHECK_SPAM && $this->check_spam( $url))
{ $this->valid = false; return; }
[/code]