One way to fix this security issue with timthumb is to NOT use timthumb at all. Just delete it. But make sure that your theme or plugin can work without it.
In case your theme or plugin depend on timthumb heavily and you must use it, then here’s the procedure to fix this security vulnerability.
• First download the latest version of timthumb from this link. Rename it from timthumb.php.txt to timthumb.php.
• Open this newly downloaded file and make sure that
ALLOW_EXTERNAL
is set to false.• Now make sure that thedefine( 'ALLOW_EXTERNAL', false );
$allowedSites
array is empty. In your new timthumb file, you will probably find this code,Replace it with this code,$allowedSites = array(
'flickr.com',
'picasa.com',
'img.youtube.com',
);
• Now upload this newly downloaded and modified timhumb.php file on your web server to replace the existing timthumb file with it.$allowedSites = array();
That’s it. Now you can use timthumb script safely. If you have any questions related to the timthumb security vulnerability or the procedure to fix this issue, then post it below.
0 comments:
Post a Comment