On Feb 11, 2010, at 8:17 AM, Alexandre Andrade wrote: > Others parts of web2py code can rely in a non-empty password.
It's always non-empty once it's hashed, and only the hash is retained. > > > > 2010/2/11 Jonathan Lundell <jlund...@pobox.com> > On Feb 11, 2010, at 7:57 AM, Alexandre Andrade wrote: > >> I'm trying to customize auth for a long time, without sucess. >> >> Massimo said have a bug fixed in trunk, so I'm waiting the new version to >> see if it works. >> >> But in your case, I think its not possible CRYPT() nothing... so makes >> sense IS_NOT_EMPTY first. > > The hash function is happy to hash an empty string, so if you put > IS_NOT_EMPTY after CRYPT, it sees the (non-empty) hash. > > >> >> 2010/2/11 aure <aureliengir...@googlemail.com> >> Hi everyone, >> >> I have customised my table for authentificaition, as shown by Massimo >> here: >> http://groups.google.com/group/web2py/browse_thread/thread/f4ae0f4c5b9336d0/327ff8e49d88fbb3?lnk=gst&q=custom+authentication+form#327ff8e49d88fbb3 >> >> If I put CRYPT() before IS_NOT_EMPTY(...) in the list of requirements >> for the field 'password', users can register with an empty password. >> If IS_NOT_EMPTY(...) comes first, everything works fine. >> >> Problematic Code: >> >> Field('password', 'password', readable=False, label=T('Password'), >> requires=[CRYPT(),IS_NOT_EMPTY(error_message=T('enter a value'))]), >> >> Non Problematic Code: >> Field('password', 'password', readable=False, label=T('Password'), >> requires=[IS_NOT_EMPTY(error_message=T('enter a value')),CRYPT()]), >> >> Aurelien >> >> -- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To post to this group, send email to web...@googlegroups.com. >> To unsubscribe from this group, send email to >> web2py+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/web2py?hl=en. >> >> >> >> >> -- >> Atenciosamente >> >> -- >> ========================= >> Alexandre Andrade >> Hipercenter.com -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.