Re: PEAR::Auth with fixed length column in Postgres = unexpected result

From: Date: Mon, 08 Dec 2003 11:26:00 +0000
Subject: Re: PEAR::Auth with fixed length column in Postgres = unexpected result
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24253@lists.php.net to get a copy of this message
Yavor Shahpasov wrote:
only '\r\n' are trimmed because 'pass ' is a valid password IMO and triming the pass would render such a pass unusable. Okay well we have a difference in opinion then :-) There's something to be said for both options. I'll change my code to do the trimming.
Thanks Jeroen
Yavor Jeroen Houben wrote:
Hi, If you use a Postgresql char(x) column with PEAR::Auth (grabbed my version from CVS) , the verifypassword method won't retun the expected result. I already addressed this problem a long time ago (see: http://marc.theaimsgroup.com/?l=pear-dev&m=105006868527734&w=2 ) and it was fixed by adding the trim() function around the passwords. Now I saw that only \r\n are trimmed, strings rigth-padded with spaces aren't trimmed anymore. Why was this done? TIA Jeroen


« previous php.pear.dev (#24253) next »