ndthanh208 / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

base64 encoded red image that says 'no hotlinkers' fix #426

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
header('Content-Length: ' . sizeof($imgData)); 

replace sizeof to strlen

Original issue reported on code.google.com by xjiopka on 2 Feb 2013 at 8:50

GoogleCodeExporter commented 9 years ago
the only way I can solve local access and access from external list

$this->getFetch = parse_url($_SERVER['HTTP_REFERER']);
$this->fetchHost = preg_replace('/^www\./i', '', $this->getFetch['host']);

if(BLOCK_EXTERNAL_LEECHERS && array_key_exists('HTTP_REFERER', $_SERVER) && (! 
preg_match('/^https?:\/\/(?:www\.)?' . $this->myHost . '(?:$|\/)/i', 
$_SERVER['HTTP_REFERER'])) && (!in_array($this->fetchHost, $ALLOWED_SITES)))

Original comment by xjiopka on 2 Feb 2013 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by BinaryMoon on 27 Sep 2013 at 9:28