[wp-hackers] Security question

Mário Gamito gamito at gmail.com
Wed Oct 22 21:35:59 GMT 2008


Is it safe to put this code in the very top of the index.php WP file ?
Is there any pitfall I can't see ?

Warm regards,
Mário Gamito

$request_filename = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
$this_dir = dirname(__FILE__).'/';
if($request_filename!=$this_dir && $request_filename!=__FILE__ &&
(is_file($request_filename) || is_dir($request_filename))) {

More information about the wp-hackers mailing list