Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Mon Aug 04, 2014 4:56 pm Reply with quote

PHP Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /home/**REMOVED**/public_html/admin/case/case.treasury.php on line 24.

Could someone please tell me what is wrong with the following line:
php Code:
if (!preg_match("/admin.php/", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Mon Aug 04, 2014 7:14 pm Reply with quote

Hi Doulos, I haven't checked out the issue (though I suspect it's the / ), but I removed a key part of your root path, which could be used for malicious purposes.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Mon Aug 04, 2014 8:59 pm Reply with quote

Its simply a very old way to check if is it an admin-file. But there should be all fine. I can't reproduce this error in php5.3x. Maybe something before this line is wrong typed.

In RN25x you can go a easier way, so try this instead of your codeline to close it out:

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

die('Access Denied');
}




Wink

_________________
Github: RavenNuke 
View user's profile Send private message
Doulos







PostPosted: Mon Aug 04, 2014 9:25 pm Reply with quote

Duh, thanks Ksugke for removing it I forgot all about that.

Thanks, neralex, that fixed it.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

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 ©