Author |
Message |
CurtisH
Life Cycles Becoming CPU Cycles

Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI
|
Posted:
Wed Mar 09, 2005 6:53 pm |
|
Has anyone that was running Sentinel 2.1.3 and using HTTPAuth been able to get HTTPAuth working in Sentinel 2.2.0 ? I cannot even get the pop up (username password) request anymore, so I tried cgiauth to see if I could at least get that to work. when following the directions for cgiauth it disables the entire site for me.
HTTPAuth has worked for me in all versions of Sentinel until 2.2.0, not sure why |
_________________ Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe |
|
|
 |
BobMarion
Former Admin in Good Standing

Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)
|
Posted:
Wed Mar 09, 2005 9:34 pm |
|
Contact me via email at webmaster(at)nukescripts(dot)net and we'll take a look see why it's not working. |
_________________ Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! |
|
|
 |
Savent
Regular


Joined: Jun 30, 2003
Posts: 81
|
Posted:
Wed Mar 09, 2005 11:58 pm |
|
I also have the same exact problem, my HTTPAuth admin pop up worked fine with 2.1.3. It wont show up in 2.2.O. Please let me know if you all found a fix, thanks. |
_________________ www.elite-gamers.com [Online Arcade 340+ Games]
|
|
|
 |
CurtisH

|
Posted:
Thu Mar 10, 2005 8:49 pm |
|
Bob should review this to determine that it is ok but I found the following restores HTTPAuth functionality for my setup:
Open /includes/nukesentinel.php
FIND:
Code:/*********************************************************************************************/
/* HTTP Auth code for admin.php protection. Tried to make it a function call */
/* but there are too many variables that would have to be globalized. */
/* This assumes that myprivatefile.php and basicauthfile.php are in the nuke root directory. */
/* Copyright 2004(c) Raven */
/*********************************************************************************************/
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);
}
}
}
}
|
REPLACE WITH:
Code:/*********************************************************************************************/
// HTTP Auth code for admin.php protection. Tried to make it a function call
// but there are too many variables that would have to be globalized.
// This assumes that myprivatefile.php and basicauthfile.php are in the nuke root directory.
// Copyright 2004(c) Raven
/*********************************************************************************************/
$sapi_name = strtolower(php_sapi_name());
$apass = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsnst_admins WHERE password_md5='' OR password=''"));
if($apass > 0 AND $ab_config['http_auth'] > 0) {
require_once("admin/modules/sentinel/functions.php");
absave_config("http_auth",'0');
}
if($ab_config['http_auth'] == 1 AND strpos($sapi_name,"cgi")===FALSE) {
if (basename($_SERVER['SCRIPT_NAME'], '.php')=='admin') {
$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);
}
}
}
|
|
|
|
|
 |
BobMarion

|
Posted:
Thu Mar 10, 2005 10:12 pm |
|
Curtis, that is exactly what I sent to you via email. The next day I got a second copy of your original email to me Guess somewhere on hte net something went haywire  |
|
|
|
 |
CurtisH

|
Posted:
Thu Mar 10, 2005 10:21 pm |
|
Maybe so... For some reason my primary mail domain loses mail from this site and portedmods, maybe that is the case with yours as well.
Anyway, problem resolved and Curt is happy happy!
Thanks Bob for the fantastic software, I love it! |
|
|
|
 |
Savent

|
Posted:
Fri Mar 11, 2005 12:12 am |
|
Thanks guys it worked  |
|
|
|
 |
BobMarion

|
Posted:
Fri Mar 11, 2005 10:59 pm |
|
Curt, we're all on the same server if I'm not mistaken so it must be the reason. |
|
|
|
 |
CurtisH

|
Posted:
Sat Mar 12, 2005 3:11 pm |
|
Raven... Is my domain being blocked? I am not a spammer or anything like it. Could you please verify that mail to and from curtishancock.com is not blocked? And if it is could you possibly tell me why?  |
|
|
|
 |
CurtisH

|
Posted:
Sat May 14, 2005 12:29 pm |
|
d***, upgraded to 2.2.1 and followed the directions to the letter and HTTPAuth has stopped working yet again. I tried the above fix and THAT doesn't work either. Any suggestions? |
|
|
|
 |
CurtisH

|
Posted:
Fri May 20, 2005 11:33 am |
|
|
|
 |
BobMarion

|
Posted:
Wed May 25, 2005 12:20 am |
|
Email me. I've been so busy I haven't had much time to read forums  |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed May 25, 2005 6:36 am |
|
CurtisHancock wrote: | Raven... Is my domain being blocked? I am not a spammer or anything like it. Could you please verify that mail to and from curtishancock.com is not blocked? And if it is could you possibly tell me why? | Did your email issue resolve itself? |
|
|
|
 |
CurtisH

|
Posted:
Wed May 25, 2005 8:04 am |
|
Yes sir, it seems to have.
And Bob I will contact you via email this evening regarding my problem. I am sure if I upgraded my site to a newer version of nuke the problem would most likely resolve itself, but to be honest there is nothing in the newer versions that I want or need. |
|
|
|
 |
BobMarion

|
Posted:
Fri May 27, 2005 1:07 am |
|
How's the 2.2.1 file I sent you working? Want to make sure it solved your issues  |
|
|
|
 |
CurtisH

|
Posted:
Fri May 27, 2005 6:00 am |
|
I guess you didn't get my email. It seems to be working perfectly! Thank you so much for helping resolve this issue.  |
|
|
|
 |
BobMarion

|
Posted:
Sat May 28, 2005 12:19 am |
|
Nope, but then again I had to take my pc down for a day to restore a ghost image. My wife downloaded something she should not have downloaded  |
|
|
|
 |
|