exquiror (exquiror) wrote in lj_everywhere,

Login fails due to rogue set_password stub - fixed

I've been having problems with users logging in, basically, no one except system could log in at all, with an incorrect password error. I finally got time to check in to it and I found that the password in the "user" table doesn't seem to be used, but instead passwords from the "password" table, which was not getting passwords inserted.

After looking at User.pm I found the subroutine in question is set_password, and there were 2 of them, the first (which would get called presumably, I'm not really a perl programmer) looks like an old stub:

sub set_password {
    my ($u, $password) = @_;
    return LJ::set_password($u->id, $password);

The second has some code that actually updates the user and password table.

So I fixed this by commenting out the first apparent stub method. New users get a password entry and can log in properly now.

Its weird no one else posting seemed to have this problem, but I checked and this is the latest svn version of User.pm, so maybe that needs to be fixed. I still have the email activation link being out of date, but I believe some answers to that were posted here earlier so I'll check that in a bit.

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded