Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
banelos
Hangin' Around



Joined: May 05, 2006
Posts: 30

PostPosted: Fri Jan 08, 2010 8:03 am Reply with quote

Hey there. It seemed to be going so well for me upgrading RN 2.02 to 2.4 but I've run into an annoying issue.

The old admin logins no longer work after upgrading. I can run the setup.php to start over with a new admin, but that way I also lose all the regular users.
What could be wrong? Did the salt/crypting change? Anything I should ensure is identical between the live site and my locally upgraded version for it to work?

Besides that I've been through the usual it seems..
    "Nice Try" bug in ipban.php
     wrong encoding in nukeNAV.php and countless fckeditor files
    Site being overrun by "eregi deprecated" msgs when debugging, still havn't found out how to hide those msgs


Despite these errors I really like the new Raven release and will donate once I get it working properly. I've had a strange problem with logins completely crashing my local apache server though, so I'm still a bit hesitant to move this upgrade onto the live website.

Thanks in advance to anyone who can help!
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Fri Jan 08, 2010 8:18 am Reply with quote

The encryption on the admin accounts did not change. Nothing on the authors table changed at all. I'd suggest comparing the old to the new in PHPmyadmin. You can see the encrypted version of the passwords and compare them even if you can't decode them.

The encoding issues and there solution have been discussed endlessly in these Forums. You really need to delete the old fckeditor file structure and FTP in the new because the directory structure changed very significantly between 2.02 and 2.4. Likewise the eregi deprecated messages can be easily hidden ... do a search but you basically need to turn display_errors off and/or turn off e_notice.

2.4 is a significant advance over 2.02 and 2.40.01 will be even better. As to your local server crashing ... we really can't help much without further details. It is most likely a local setup issue since there is nothing in the login process that hasn't been tested in a bunch of different environments successfully.
 
View user's profile Send private message Visit poster's website
banelos







PostPosted: Fri Jan 08, 2010 9:08 am Reply with quote

Fixed the deprecated thing with "$error_reporting = E_ALL^E_NOTICE^E_DEPRECATED;" in rnconfig.php. Helps me debug my own scripts without all the deprecated clutter.

The admin passwords are still troubling me though.I have imported the admins from the live site and then created a new admin using setup.php.
My 2 admins have almost the same usernames (lowercase a-z chars only) and exactly the same password. Even in PhpMyAdmin the pwd hash is exactly the same. Still it will only let me login as the newly created one.

Having a hard time figuring out what the problem is here.
 
fkelly







PostPosted: Fri Jan 08, 2010 10:10 am Reply with quote

You might need to go into NukeSentinel administration, the httpauth menu there and have it scan for new administrators. There is a nsnst_admins table that needs to get updated, I think.
 
banelos







PostPosted: Fri Jan 08, 2010 11:39 am Reply with quote

Hmm the nuke_authors table of the live/old (2.02) and the local/new (2.40) are exactly alike including the pwd hashes.

On the local site I tried scanning for new admins in NukeSentinelon Admin and it found the 5 admins I had imported from the live site. However they would still not log in.

The nuke_nsnst_admins table is not similar at all. On the local one the admin I created in setup.php has his password listed in cleartext in the "password" field while the others have a jumbled hash-looking one.
On the live site's nuke_nsnst_admins table no passwords are in cleartext and none of the hashes are equal to the ones of the same admin on the local.

Are there any crypt salts or sitekeys that needs to be the same or am I missing something?
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Jan 08, 2010 1:19 pm Reply with quote

humor me and try editing one of these admin and then see if you can log in. I'm having a really hard time trying to think what might be causing this. I personally do not think it is nuke sentinel related.

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Fri Jan 08, 2010 1:47 pm Reply with quote

is your $sitekey in config.php the same for both?
 
View user's profile Send private message Visit poster's website
banelos







PostPosted: Fri Jan 08, 2010 1:52 pm Reply with quote

Now this is strange..
I removed all the surplus admins. The only imported admin left is "banelos-admin"
The other one "banelosadmin" is the one I created from setup.php to be able to log in at all.

Then I changed the password for both to test123 and only the new one would log in.
Created some new admins as well with same password and tested those, they all worked too.

authors table:
Image

nsnst_admins table:
Image

Quite clear from the pwd fields that the password is the same. Yet the banelos-admin author cannot login.
The nsnst_admins table seems strange. Originally only the banelosadmin user had a cleartext password, but I manually changed changed the password in the NukeSentinel auth_list for banelos-admin and test. newadmin was discovered by NukeSentinel but not further changed.

EDIT: sitekey in config.php is exactly the same. Does the Nuke Sentinel crypt salt matter?

Perhaps its better if I just start over from a clean 2.4 database and then import what I can, this is annoying me quite a lot.
 
banelos







PostPosted: Fri Jan 08, 2010 2:17 pm Reply with quote

LOL! Apparently it was the slash in banelos-admin.
Tried changing the 'aid' in the database to something without a slash.. Now I could log in just fine.
Changed it back and I couldn't log in again.. I feel so stupid now :/

PS. Is it me or does NukeSentinel seems to be easily fooled by a spoofed X-Forwarded-For? I use it to circumvent region-restrictions for US-only content on the web, like The Daily Show, but NukeSentinel thinks my IP is 12.13.14.15 at the moment.


Last edited by banelos on Fri Jan 08, 2010 2:21 pm; edited 1 time in total 
fkelly







PostPosted: Fri Jan 08, 2010 2:21 pm Reply with quote

I think it's this code in admin.php that's getting you:

Code:
if (isset($aid) && (ereg('[^a-zA-Z0-9@_.]',trim($aid)))) {

   header('Location: '.$admin_file.'.php');
   die();
}


Unless I am mistaken the dash (-) character won't be found in that ereg and you will just die. Just another case of dumb inconsistency in the software. If we don't want you to use a dash character in a nickname we shouldn't let you register it at all.
 
banelos







PostPosted: Fri Jan 08, 2010 2:23 pm Reply with quote

Ah okay, thanks for the notice fkelly.
Yes it would have been nice if at least the update script had searched for any admins with any characters not matching that ereg and notified me. But if this wasn't a change from the upgrade to 2.4 I'd say that it's a bug if you can create an admin that doesn't pass that ereg.

EDIT: Definitely a reproducable bug. Try creating an admin with 'test-admin' as name/aid and log in on that admin account.
 
fkelly







PostPosted: Fri Jan 08, 2010 2:48 pm Reply with quote

Yes, I "reproduced" it on a test system before I posted it here. It's really not an issue for the upgrade script ... it is just a bug and inconsistency that I suspect has existed for the life of generic Nuke. A sub-species of the genus "fractured-filtering" if you will.

I have posted this in our issues tracking system for 2.5. For what it's worth I've had a quick look at authors.php that's in the admin directory and I don't see where we do any filtering of the characters that can be in an administrative nickname. The only requirement is that it be 25 characters or less. Most likely the ereg could be eliminated entirely, in fact the whole logic probably should be removed. I was thinking at first that we could check the input and make sure it is 25 characters or less but that's unnecessary. If it's more than 25 characters it won't match a nickname in the authors table anyway.
 
banelos







PostPosted: Fri Jan 08, 2010 2:51 pm Reply with quote

Yeah the upgrade-script thing was only if it was something that changed in what characters are allowed in admin names from 2.02 and 2.40, but it seems it isn't.

Thanks for looking into this. I will continue to use RavenNuke and am in the midst of updating subBlack to work and look a little better on RN2.4.
I will release it here once it's done so others can benefit from it as well.
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Apr 10, 2011 10:10 pm Reply with quote

Just to let you know:

The inconsistency is (also) in the filtering in the installer. The dash is NOT allowed by default. When I set up the installer I used the defaults in RNYA:
define('_rnADMIN_ALLOWED_USERID_CHARACTERS','[a-zA-Z0-9@_\.]*'); //From admin.php, not realizing the eregi issue. What needs to be done is to incorporate the installer configuration rules into the core. In other words, whatever and wherever rules are utilized they need to all pull from a common place.

This will be fixed in the next release which we are working on right now - Version 2.5 Wink
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

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 ©