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
tabascolibre
New Member
New Member



Joined: Jan 25, 2005
Posts: 11
Location: El infierno Verde

PostPosted: Mon Mar 07, 2005 6:52 pm Reply with quote

what does it mean?, with the old version CGIAuth works correctly, but now in the version NukeSentinel™ 2.2.0, it says to me this: HTTPAuth Requires "register_globals" to be ON. Smack

_________________
Yo vengo de la tierra abundante y del calor sofocante...

www.tabascolibre.tk 
View user's profile Send private message Visit poster's website
BobMarion
Former Admin in Good Standing



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

PostPosted: Tue Mar 08, 2005 11:08 am Reply with quote

Try this, find (at the end of includes/nukesentinel.php):
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 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);
      }
    }
  }
//}

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
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 ©