Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)
Author Message
CurtisH
Life Cycles Becoming CPU Cycles



Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Wed Mar 09, 2005 12:43 pm Reply with quote

Will there be a version for PHP-Nuke 6.9? I see that the current release is only for 7.1 to 7.5 and a version just for 7.6

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
BobMarion
Former Admin in Good Standing



Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Wed Mar 09, 2005 4:12 pm Reply with quote

The current release is tested with 7.1 and up. It is not rated for 6.9 because there is not a Patched 2.9 for 6.9 . You would have to replace if (defined('FORUM_ADMIN')) { with if ($forum_admin == 1) { and replace } elseif (defined('INSIDE_MOD')) { with } elseif ($inside_mod == 1) {. After making those changes you should have no problem running it on 6.9 Smile

_________________
Bob Marion
Codito Ergo Sum
http://www.nukescripts.net 
View user's profile Send private message Send e-mail Visit poster's website
CurtisH







PostPosted: Wed Mar 09, 2005 4:21 pm Reply with quote

Thanks Bob! I kinda messed around with it on a 6.9 site yesterday and did inded make the first modification you mentioned but the HTTPAuth function quit working on the site, meaning that I no longer got a pop up request for username and password even though Admins had been set in Sentinel and HTTPAuth was turned on. Wasn't sure if being that it wasn't for 6.9 had anything to do with that. Sentinel isn't as secure without the ability to use HTTPAuth
 
BobMarion







PostPosted: Fri Mar 11, 2005 10:58 pm Reply with quote

The HTTPAuth issue is cured for most by the following (in includes/nukesentinel.php, last function).

Find:
Code:
if(ini_get("register_globals")) {

  $sapi_name = strtolower(php_sapi_name());
  $apass = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsnst_admins WHERE password_md5=''"));
  if($apass > 0 AND $ab_config['http_auth'] == 1) {
    @require_once("admin/modules/nukesentinel/functions.php");
    absave_config("http_auth",'0');
  }
  if($ab_config['http_auth'] == 1 AND strpos($sapi_name,"cgi")===FALSE) {
    if (basename($_SERVER['PHP_SELF'], '.php')==$admin_file) {
      $allowPassageToAdmin = FALSE;
      $authresult = $db->sql_query("SELECT login, password_md5 FROM ".$prefix."_nsnst_admins");
      while ($getauth = $db->sql_fetchrow($authresult)) {
        if ($PHP_AUTH_USER==$getauth['login'] AND md5($PHP_AUTH_PW)==trim($getauth['password_md5'])) {
          $allowPassageToAdmin = TRUE;
          break;
        }
      }
      if (!$allowPassageToAdmin) {
        header("WWW-Authenticate: Basic realm=Protected");
        header("HTTP/1.0 401 Unauthorized");
        die(_AB_GETOUT);
      }
    }
  }
}


Comment out the first and last line of this code section so that it
Looks Like:
Code:
//if(ini_get("register_globals")) {

  $sapi_name = strtolower(php_sapi_name());
  $apass = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsnst_admins WHERE password_md5=''"));
  if($apass > 0 AND $ab_config['http_auth'] == 1) {
    @require_once("admin/modules/nukesentinel/functions.php");
    absave_config("http_auth",'0');
  }
  if($ab_config['http_auth'] == 1 AND strpos($sapi_name,"cgi")===FALSE) {
    if (basename($_SERVER['PHP_SELF'], '.php')==$admin_file) {
      $allowPassageToAdmin = FALSE;
      $authresult = $db->sql_query("SELECT login, password_md5 FROM ".$prefix."_nsnst_admins");
      while ($getauth = $db->sql_fetchrow($authresult)) {
        if ($PHP_AUTH_USER==$getauth['login'] AND md5($PHP_AUTH_PW)==trim($getauth['password_md5'])) {
          $allowPassageToAdmin = TRUE;
          break;
        }
      }
      if (!$allowPassageToAdmin) {
        header("WWW-Authenticate: Basic realm=Protected");
        header("HTTP/1.0 401 Unauthorized");
        die(_AB_GETOUT);
      }
    }
  }
//}


For some reason some servers are having issues with the test to check for register globals Sad
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)

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 ©