Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ Bug Reports
Author Message
ring_c
Involved
Involved


Joined: Dec 28, 2003
Posts: 276
Location: Israel

PostPosted: Thu Jun 16, 2005 6:15 am Reply with quote

After upgrading Sentinel 2.2.1 to 2.3 (on a phpnuke 6.7 system) my sentinel blocks shows:

Code:
You can't access this file directly...


The only way to fix it, was replacing the new blocks with the old 2.2.1 blocks.

Would appreciate a more elegant way to figure this out...
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Thu Jun 16, 2005 6:27 am Reply with quote

You should see a line of code like this in your block file
Code:
if(!defined('NUKE_FILE') && !defined('BLOCK_FILE')) { die("You can't access this file directly..."); }

This requires that in mainfile.php you have this as the first line of code after the opening <? tag
Code:
define('NUKE_FILE', true);
and also in mainfile, in function render_blocks() you have
Code:
function render_blocks($side, $blockfile, $title, $content, $bid, $url) {

   define('BLOCK_FILE', true);

Do you?
 
View user's profile Send private message
ring_c
PostPosted: Thu Jun 16, 2005 2:56 pm Reply with quote

Raven wrote:
You should see a line of code like this in your block file
Code:
if(!defined('NUKE_FILE') && !defined('BLOCK_FILE')) { die("You can't access this file directly..."); }

Correct. Have checked the 2.2.1 version, found you've used PHP_FILE instead. what's the difference?

Raven wrote:
This requires that in mainfile.php you have this as the first line of code after the opening <? tag
Code:
define('NUKE_FILE', true);

Should be <?php, isnt's it?
Anyway, after adding the above, my mainfile.php now starts like this:
Code:
<?php


define('NUKE_FILE', true);

if (defined('FORUM_ADMIN')) {
  @include_once("../../../includes/nukesentinel.php");
} elseif (defined('INSIDE_MOD')) {
  @include_once("../../includes/nukesentinel.php");
} else {
 @include_once("includes/nukesentinel.php");
}

Is this ok?

Raven wrote:
and also in mainfile, in function render_blocks() you have
Code:
function render_blocks($side, $blockfile, $title, $content, $bid, $url) {

   define('BLOCK_FILE', true);

Do you?

I didn't. added them both. actually, adding only the second line alone did the job. then, why do I need the first one for?

Anyway, is there any place you can direct me to, to test sentinel? Is there a post where you define which configuration is the best protection?

Thanks ALOT, Raven!!!
 
Raven
PostPosted: Thu Jun 16, 2005 3:10 pm Reply with quote

<?php is for older installations and scripts. Most installations just allow the short form. using <?php will not hurt anything.

PHP_SELF - Use the newer way, it's more secure.

You need both lines. If it worked with only the second one, then chances are that you now haven 2 instances of define('NUKE_FILE', true);
 
ring_c
PostPosted: Thu Jun 16, 2005 4:23 pm Reply with quote

Quote:

ou need both lines. If it worked with only the second one, then chances are that you now haven 2 instances of define('NUKE_FILE', true);

Nope... have rechecked.
Anyway, what about my second question, please?
Here's a reminder:

Quote:

Anyway, is there any place you can direct me to, to test sentinel? Is there a post where you define which configuration is the best protection?
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ Bug Reports

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 ©