Joined: Oct 30, 2002 Posts: 1043 Location: RedNeck Land (known as Kentucky)
Posted:
Tue Jun 15, 2004 8:07 pm
sixonetonoffun wrote:
Building on what Raven did with cmd above NovemberRain try this its working ok for me but I only tested it briefly.
Around line 112 in includes/sentinel.php
change this line
if (eregi("http\:\/\/", $name) OR eregi("cmd",$querystring) OR eregi("exec",$querystring) OR eregi("concat",$querystring)) {
To this:
Code:
if (eregi("http\:\/\/", $name) OR (eregi("cmd",$querystring) AND !eregi("&cmd",$querystring)) OR eregi("exec",$querystring) AND !eregi("execu",$querystring) OR eregi("concat",$querystring)) {
six, question?
Shouldn't the code
Code:
if (eregi("http\:\/\/", $name) OR (eregi("cmd",$querystring) AND !eregi("&cmd",$querystring)) OR eregi("exec",$querystring) AND !eregi("execu",$querystring) OR eregi("concat",$querystring)) {
be like
Code:
if (eregi("http\:\/\/", $name) OR (eregi("cmd",$querystring) AND !eregi("&cmd",$querystring)) OR (eregi("exec",$querystring) AND !eregi("execu",$querystring)) OR eregi("concat",$querystring)) {
with the extra pair of ( and ) to make the exec check inclusive and not interfere with the concat check? I'm not saying it is wrong but only wanting to make sure I'm understanding it correctly
I never tested anything but the user name with Executioner (Until just now) its doesn't seem to interfere but theres no reason not to add the extra braces for consistency at the very least.
In another thread we added AND !eregi("cmd=highlight",$querystring)) for compatability with Gallery it could probably be shortened but I left it more specific for the sake of resolving the problem for the user without adding any new wholes by mistake.
I couldn't find the suspicious string in there. Can you spot it?
Is there a way to exclude 127.0.0.1 from sentinel at least for the remaining testing time?
Joined: Aug 27, 2002 Posts: 16987 Location: Kansas
Posted:
Thu Jul 08, 2004 6:07 am
Same difference, although you could accomplish the same thing with just a tad bit more efficiency like this
Code:
if (!stristr($querystring,'&file=nickpage') AND stristr($querystring,'&user=') AND ($name==Private_Messages || $name==Forums || $name==Members_List)) {
block_ip($ip, $banuser, $bantime, $blocker_row);
}
That avoides the {} processing and since it's the first logic check it will exit immediately. But, the gain would be so minimal it's not really necessary to change it. It's just for those 'SPEED' freaks out there
But I didn't get the mod running completly yet, grrrr...
I'm a little lost in the paths
About everything's running, apart from saving the base nickpage data and viewing the nickpage, which some nitpicking people could consider to be core functions
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