Re: Passwd Problems - Cannot Change password, no UPDATE applied

Simon Brereton <[email protected]> Thu, 22 Oct 2009 21:28:36 +0200
Newsgroups gmane.comp.horde.sork
Message-ID <8AEF1088F84EE440A3004F96F838014E0CAB36FA@DADAEXCCR.dadaexchange.local>
> -----Original Message-----
> From: Simon 
> Sent: Wednesday, October 21, 2009 2:17 PM


> > -----Original Message-----
> > From: [email protected] [mailto:sork-
> [email protected]]
> > On Behalf Of Eric Jon Rostetter
> > Sent: Wednesday, October 21, 2009 12:06 PM
> 
> 
> > > So, the db lookup is checking against form entry and failing.
> >
> > Yeah, either it isn't getting a value (username or password is wrong;
> I
> > think
> > we can rule out permissions, firewalls, etc. since you get a sql log
> > entry)
> > or getting the wrong value (doesn't match form value, or encryption
> type
> > is wrong, or encoding is wrong), or your sql query is wrong (maybe
> needs
> > a custom sql query instead of the default one).
> 
> That's what I meant below when I said the custom sql queries were in
> backends.php (but commented out).  I presume if they aren't commented,
> then they override the ones in main.php?  In anycase, I've tried with
> and without custom queries and I see the same thing in the logs.  I
> think we can rule that out.
> 
> You do raise one issue - for some reason when mysql create databases -
> unless I specify UTF-8 - it defaults to latin1_swedish_ci - do you think
> this could be the issue?  (On a side note, I'd love to stop mysql from
> doing that..).

So, I've changed the database to UTF-8 (not that it should have mattered).  Same result.

I've tested that the password Firefox is putting in is correct by the simple expedient of trying to "change" the password with the (current) correct password.  Passwd correctly sees these two strings as the same. 

So, we're back looking at what the DB says.  I've tested the query - the default one and the customised one in backends.php - I still have no idea what passwd is seing, but these queries return the correct result in the mysql cli interface (basically, I've just pasted them from the log).  I did note that the log contains a call to the horde before it makes a call using the sql backend I set up.  Is this normal?

091022 19:59:45     576 Connect     root@localhost on
                    576 Init DB     horde
                    576 Init DB     horde
                    576 Init DB     horde
                    576 Query       SELECT pref_scope, pref_name, pref_value FROM horde_prefs WHERE pref_uid = '[email protected]' AND (pref_scope = 'passwd' OR pref_scope = 'horde') ORDER BY pref_scope
                    577 Connect     postfix@localhost on
                    577 Init DB     Mail
                    577 Init DB     Mail
                    577 Query       SELECT Password  FROM MailAccounts  WHERE EmailAdd = '[email protected]'
                    576 Quit
                    577 Quit

I've tried encrypting both.

I've tried adding the BD to the SELECT/UPDATE queries (just in case something in $deamon wasn't working properly.

I'm at a loss to see what else I can do - I wish there was a way to add debug lines to main.php so I could see the variable being returned to mail.php.


Any more hints/tips are welcome.

Thanks.

Simon


-- 
Sork mailing list - Join the hunt: http://horde.org/bounties/#sork
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]