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(tm) v2.5.x
Author Message
webservant
Worker
Worker



Joined: Feb 26, 2006
Posts: 206
Location: Springfield, MA

PostPosted: Sat Dec 23, 2006 12:57 pm Reply with quote

I just ugrade my test system from 2.5.03 to 2.5.04. The upgrade went smoothly, but I found an issue on the NukeSentinel Admin screen after running nsnst.php.

The following appears in the middle of the screen...
Code:
Warning: base64_decode() expects parameter 1 to be string, array given in /home/doulos/public_html/includes/nukesentinel.php on line 972

Admin Auth List
 
Warning: base64_decode() expects parameter 1 to be string, array given in /home/doulos/public_html/includes/nukesentinel.php on line 972
Scan for New Admins
 
Warning: base64_decode() expects parameter 1 to be string, array given in /home/doulos/public_html/includes/nukesentinel.php on line 972
Database Maintenance


I looked at the code around 972, and find this:
Code:
function is_god($axadmin) {

  global $db, $prefix, $aname;
  $tmpadm = base64_decode($axadmin);
  $tmpadm = explode(":", $tmpadm);
  $aname = $tmpadm[0];
  $apwd = $tmpadm[1];
  if(!empty($aname) AND !empty($apwd)) {
    $aname = trim($aname);
    $apwd = trim($apwd);
    $admrow = $db->sql_fetchrow($db->sql_query("SELECT * FROM `".$prefix."_authors` WHERE `aid`='$aname'"));
    //if((strtolower($admrow['name']) == "god" OR $admrow['radminsuper'] == 1) AND $admrow['pwd']==$apwd) { return 1; }
    if(strtolower($admrow['name']) == "god" AND $admrow['pwd']==$apwd) { return 1; }
  }
  return 0;
}


When I changed the function to be similar to is_admin in mainfile.php, it works. Here is my changed code:
Code:
function is_god($axadmin) {

  global $db, $prefix, $aname;
//  Replace with is_admin type if statement.
//  $tmpadm = base64_decode($axadmin);
//  $tmpadm = explode(":", $tmpadm);
//   $aname = $tmpadm[0];
//    $apwd = $tmpadm[1];
  if (!is_array($axadmin)) {
     $tmpadm = base64_decode($axadmin);
    $tmpadm = addslashes($tmpadm);
     $tmpadm = explode(":", $tmpadm);
   $aname = $tmpadm[0];
     $apwd = $tmpadm[1];
  } else {
   $aname = $axadmin[0];
     $apwd = $axadmin[1];
  }
  if(!empty($aname) AND !empty($apwd)) {
    $aname = trim($aname);
    $apwd = trim($apwd);
    $admrow = $db->sql_fetchrow($db->sql_query("SELECT * FROM `".$prefix."_authors` WHERE `aid`='$aname'"));
    //if((strtolower($admrow['name']) == "god" OR $admrow['radminsuper'] == 1) AND $admrow['pwd']==$apwd) { return 1; }
    if(strtolower($admrow['name']) == "god" AND $admrow['pwd']==$apwd) { return 1; }
  }
  return 0;
}

_________________
Awaiting His Shout
Webservant - GraciousCall.org
Romans 8:28-39 
View user's profile Send private message Visit poster's website AIM Address
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Sat Dec 23, 2006 9:15 pm Reply with quote

Haven't tried the new version yet, but we should notify Bob.

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







PostPosted: Sat Dec 23, 2006 10:09 pm Reply with quote

OK. How? Where?
 
kguske







PostPosted: Sat Dec 23, 2006 10:14 pm Reply with quote

Just did so. Thanks...
 
BobMarion
Former Admin in Good Standing



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

PostPosted: Sun Dec 24, 2006 1:56 am Reply with quote

Strage, it hasn't popped that warning up at me. What's even stranger is that has been coded like that since 2.4.2pl7. I will dive in right after X-Mas on it.

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







PostPosted: Sun Jan 14, 2007 1:11 pm Reply with quote

Any ideas as to why this happened?
 
BobMarion







PostPosted: Sat Mar 03, 2007 3:46 pm Reply with quote

I'll ensure this goes into 2.5.07 as it completely slipped my mind for 2.5.06 Sad
 
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Sat Mar 03, 2007 4:16 pm Reply with quote

Nobody reported ever such an issue. I´ve checked all my upgrades and couldn´t find nothing special in NukeSentinel Admin. However, I have still a 3.2b 7.6 website I´ll check what I´ll find there after upgrade NukeSentinel.
 
View user's profile Send private message
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(tm) v2.5.x

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 ©