[sork] Passwd Problems - Cannot Change password, no UPDATE applied - RESOLVED

Simon Brereton simon.brereton at dada.net
Tue Oct 27 22:14:19 UTC 2009


> -----Original Message-----
> From: Simon Brereton
> Sent: Friday, October 23, 2009 12:12 PM>

 
> > -----Original Message-----
> > From: sork-bounces at lists.horde.org [mailto:sork-
> bounces at lists.horde.org]
> > On Behalf Of Eric Jon Rostetter
> > Sent: Thursday, October 22, 2009 9:36 PM
> 
> 
> > Quoting Simon Brereton <simon.brereton at dada.net>:
> >
> > > This is what appeared in the logs:
> > >
> > > Oct 22 22:29:49 HORDE [debug] [passwd] SQL Query by
> > > Passwd_Driver_sql::_lookup(): SELECT Password FROM MailAccounts
> > > WHERE EmailAdd = ? [on line 110 of
> > > "/usr/share/horde3/passwd/lib/Driver/sql.php"]
> > > Oct 22 22:29:49 HORDE [debug] [passwd] Current password returned
> > > from DB as:  [on line 121 of
> > > "/usr/share/horde3/passwd/lib/Driver/sql.php"]
> >
> > Oh, that's bad.  It appears to be returning nothing, but also not
> > returning
> > an error...
> >
> > Unless you set the "pass_col" wrong, this is rather a bad thing...
> 
> 
> Pass_col can't be wrong - since the copying and pasting the query in
> mysql.log at a mysql prompt returns the correct result.  Still I can't
> believe it's a code thing - someone else would have had an issue (even
> though I feel I'm the only one on this list apart from you) :)


Actually, you were almost right.  Here's where the problem was and what was done to fix it.

For reasons best known to myself (and several people have since laughed at me), my Tables and Columns in my DB are sentence case or Camel Case.  Thus EmailAdd and Password..

In the file sql.php (in ..passwd/Driver/) $result on line 113 is returned correctly.  $row on line 116 is also returned correctly, but the failure was on line 121 - $current_password because the term "password" in the array didn't match the term backends.php specified for it (in my case "Password"..  )

The work around was to change backends.php and pass_col to be all lower case.  However, I think it would be more correct to keep it keep it as it is (since it's used in line 106.

The other - dirtier - option is to strtolower it in line 121..

Thanks for your help!  It's working for me now.

SPB.






More information about the sork mailing list