Author Topic: Another E-Blah authentication problem  (Read 6517 times)

0 Members and 2 Guests are viewing this topic.

Offline Zippy

  • album.pl User
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Another E-Blah authentication problem
« Reply #15 on: February 03, 2006, 14:13:52 »
Yes, that appears to be working.  I'll check it out more when I get home. If there are any problems I'll let you know!

Thanks! :-)

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Another E-Blah authentication problem
« Reply #16 on: February 03, 2006, 14:30:58 »
Glad to hear it... I've updated the zip file, thanks for the bug report.

Offline Zippy

  • album.pl User
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Another E-Blah authentication problem
« Reply #17 on: February 08, 2006, 23:16:43 »
*pulls all hair from head*

For some reason now when I login to the forum (username-test  password-1234), album.pl only recognizes me for a few page navigations (home page, then upload a photo, go look at it, then go back to upload another) and then thinks I am username "albumpassword"  and password "1234"


2773: Entering subroutine: Authenticate
3614: Entering subroutine: cookieLogin
3873: [eblah_pw] = [1234] (u:-p:)
3788: Found e-Blah password info: eblah_pw
3790: $mypassword set to 1234
3873: [eblah_un] = [test] (u:-p:1234)
3780: Found e-Blah username: eblah_un
3782: $myusername set to test
3873: [albumusername] = [test] (u:test-p:1234)
3850: Found generic userid info: test
3852: $myusername set to test
3858: Found Native album.pl username info: albumusername
3860: $myusername set to test
3873: [eblah_Logout1] = [$username] (u:test-p:1234)
3850: Found generic userid info: albumpassword
3852: $myusername set to albumpassword
3873: [albumpassword] = [1234] (u:albumpassword-p:1234)
3842: Found generic password info: 1234
3844: $mypassword set to 1234
3866: Found Native album.pl password info: albumpassword
3868: $mypassword set to 1234
3889: Found username: albumpassword and password: 1234 in cookie. (Maybe #: and name:  too...)
3898: Leaving subroutine: cookieLogin --> return code is 1
2859: Using YaBB Authentication (type 3)
2865: Looking for YaBB 2 file: [/services/webpages/mysite.com/cgi-bin/forum/Members/albumpassword.vars]
2900: Looking for YaBB file: /services/webpages/mysite.com/cgi-bin/forum/Members/albumpassword.dat

*sigh*
« Last Edit: February 08, 2006, 23:22:03 by Zippy »

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Another E-Blah authentication problem
« Reply #18 on: February 13, 2006, 11:32:56 »
Try running album.pl?function=delcookie to kill off all the native album.pl cookies...

Offline Zippy

  • album.pl User
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Another E-Blah authentication problem
« Reply #19 on: February 13, 2006, 12:34:54 »
I have run album.pl?function=delcookie

I can navigate between Home, Search, Random, Popular, Upload, and Recent with no problems....

But everytime I upload a photo and then go "album home" The login button shows up and it doesn't know who I am again...

Also when clicking on "create album" on the admin menu, the login button shows up and doesn't know who I am...

« Last Edit: February 13, 2006, 16:41:29 by Zippy »

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Another E-Blah authentication problem
« Reply #20 on: February 13, 2006, 16:44:10 »
You could always disable native cookies by deleting these lines:

Code: [Select]
# Native album.pl cookie login info :D
if ($lastchip=~/^$::albumcookieusername.*/)
{
debug("Found Native album.pl username info: $lastchip",3,__LINE__);
$myusername=$chip;
debug("\$myusername set to $myusername",3,__LINE__);
}

# Native album.pl cookie login info :D
if ($lastchip=~/^$::albumcookiepassword.*/)
{
debug("Found Native album.pl password info: $lastchip",3,__LINE__);
$mypassword=$chip;
debug("\$mypassword set to $mypassword",3,__LINE__);
}

That way it will never fall back to using these (which it shouldn't be anyway since you're trying to use eBlah.) It's not "pretty" but it might help.

Offline Zippy

  • album.pl User
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Another E-Blah authentication problem
« Reply #21 on: February 13, 2006, 17:08:44 »
I have deleted those lines....

cleared cookies...

Sign in as admin....

Upload photo

go back home... still knows who I am.. Yeah!

Still can't create new album (that page still shows login button)


Then I sign in as a different member. Album.pl doesn't know who I am....



I have just been to another e-blah forum which is also using album.pl. They are also having problems with authentication with multiple users on the same computer. That forum is just putting up with the problem. There has got to be a way to rectify this problem without having to manually delete cookies everytime or relogging into album.pl.  I have yet to integrate this into my forum as it is not 100% right yet.

Do you have any other suggestions Mike?



« Last Edit: February 15, 2006, 09:36:48 by Zippy »

Offline Zippy

  • album.pl User
  • *
  • Posts: 18
  • Karma: +0/-0
Re: Another E-Blah authentication problem
« Reply #22 on: February 24, 2006, 10:17:59 »
Clear cookies
Login as user 1
everything works fine
Log out of forum
Log back into forum with user "test"
The gallery recognizes the new user
I upload a photo successfully as that new user
I go to gallery home
Now the gallery doesn't recognize me anymore

the following is the debug from the home page:




8870: Cookie Contents Follow:
8884: [eblah_pw] = [1234]
8884: [eblah_un] = [test]
8884: [albumusername] = [test]
8884: [eblah_Logout1] = [$username]
8884: [albumpassword] = [1234]
8887: END OF COOKIE
2773: Entering subroutine: Authenticate
3614: Entering subroutine: cookieLogin
3873: [eblah_pw] = [1234] (u:-p:)
3788: Found e-Blah password info: eblah_pw
3790: $mypassword set to 1234
3873: [eblah_un] = [test] (u:-p:1234)
3780: Found e-Blah username: eblah_un
3782: $myusername set to test
3873: [albumusername] = [test] (u:test-p:1234)
3850: Found generic userid info: test
3852: $myusername set to test
3858: Found Native album.pl username info: albumusername
3860: $myusername set to test
3873: [eblah_Logout1] = [$username] (u:test-p:1234)
3850: Found generic userid info: albumpassword
3852: $myusername set to albumpassword
3873: [albumpassword] = [1234] (u:albumpassword-p:1234)
3842: Found generic password info: 1234
3844: $mypassword set to 1234
3866: Found Native album.pl password info: albumpassword
3868: $mypassword set to 1234
3889: Found username: albumpassword and password: 1234 in cookie. (Maybe #: and name:  too...)
3898: Leaving subroutine: cookieLogin --> return code is 1
2859: Using YaBB Authentication (type 3)
2865: Looking for YaBB 2 file: [/services/webpages/mysite.com/cgi-bin/forum/Members/albumpassword.vars]
2900: Looking for YaBB file: /services/webpages/mysite.com/cgi-bin/forum/Members/albumpassword.dat

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: Another E-Blah authentication problem
« Reply #23 on: February 24, 2006, 10:29:26 »
Ok, I see what's going on here... Edit album.pl near line 3619 and change it from:

Code: [Select]
# Check to see if the user has a cookie, and log them in with that.
foreach $chip (%::cookie)
{

to:

Code: [Select]
# Check to see if the user has a cookie, and log them in with that.
foreach $chip (%::cookie)
{
# Handle special case for eblah setting $username in the cookie value
if ($lastchip=~/eblah_Logout/i && $::cookie{$lastchip}=~/username/i)
{
next;
}

Give that a shot, if it works I'll merge it into the zip download.


Cheers
Mike
« Last Edit: February 24, 2006, 10:45:32 by Mike Bobbitt »

Offline Warlock

  • album.pl Donor
  • album.pl User
  • *
  • Posts: 5
  • Karma: +0/-0
    • Free PC Help Portal
Re: Another E-Blah authentication problem
« Reply #24 on: July 17, 2006, 12:28:33 »