Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke
Author Message
JRSweets
Worker
Worker



Joined: Aug 06, 2004
Posts: 192

PostPosted: Fri Jan 21, 2005 8:12 am Reply with quote

Don't these checks now do the same thing?

Code:
if ( !defined('ADMIN_FILE') )

{
   die("Illegal File Access");
}


and

Code:
if (!stristr($_SERVER['SCRIPT_NAME'], "".$admin_file.".php")) {

    die ("Access Denied");
}


Would the define check be quicker than the stristr() and could the same define check be used in place of the stristr() in all the blocks and modules.

Say add something like:
Code:
define('NUKE_FILE', true);

to mainfile.php and use this
Code:
if ( !defined('NUKE_FILE') )

{
   die("Illegal File Access");
}

in the blocks and modules.
 
View user's profile Send private message
djmaze
Subject Matter Expert



Joined: May 15, 2004
Posts: 727
Location: http://tinyurl.com/5z8dmv

PostPosted: Fri Jan 21, 2005 10:47 am Reply with quote

Now you go ask FB if he wants to that Laughing
 
View user's profile Send private message Visit poster's website
JRSweets







PostPosted: Fri Jan 21, 2005 2:50 pm Reply with quote

So is using a define quicker? If so Chatserv just changed all the calls to eregi() to use stristr() for speed, why not change the patched series to use the defines instead? All the code using the old method will still work.
 
djmaze







PostPosted: Fri Jan 21, 2005 4:52 pm Reply with quote

I'm a CPG Dragonfly coder so i realy don't bother much.

But your point about using
Code:
if (!define())
i agree with you 100%
 
JRSweets







PostPosted: Tue Feb 08, 2005 2:43 pm Reply with quote

Just to let people know, the new Patched Version 2.9 will do just that...
[ Only registered users can see links on this board! Get registered or login! ]
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©