dfwcomputer Posted January 18, 2008 Share Posted January 18, 2008 i have 2 different versions of nuke and just wondering what the difference is between the following 2 pieces of code that are used to protect the modules.This code is located at the very beginning of the index file, Is one more secure than the other? or if any what is the difference. if (!eregi("modules.php", $PHP_SELF)) { die ("You can't access this file directly..."); } and if ( !defined('MODULE_FILE') ) { die("You can't access this file directly..."); } Quote Link to comment https://forums.phpfreaks.com/topic/86581-nuke-module-access/ Share on other sites More sharing options...
Nhoj Posted January 18, 2008 Share Posted January 18, 2008 if (!eregi("modules.php", $PHP_SELF)) { die ("You can't access this file directly..."); } ^-- That searches to see if the page we are accessing from the address bar is "modules.php", if it is it displays that error. if ( !defined('MODULE_FILE') ) { die("You can't access this file directly..."); } ^-- Somewhere in a different nuke file it defines what a MODULE_FILE is, if MODULE_FILE is not defined on that page then display the same error... Whether or not one is more secure than the other would require you to find the part that defines 'MODULE_FILE' Quote Link to comment https://forums.phpfreaks.com/topic/86581-nuke-module-access/#findComment-442441 Share on other sites More sharing options...
dfwcomputer Posted January 18, 2008 Author Share Posted January 18, 2008 argh ok,,, i also found this in modules.php define('MODULE_FILE', true); Quote Link to comment https://forums.phpfreaks.com/topic/86581-nuke-module-access/#findComment-442570 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.