[web2py] Re: CRYPT() hmac.new and determining length of password

2010-01-11 Thread mdipierro
Only if you make your own validator and apply it before the others. The validator does not need to return the original value, it can change it. class V: def __call__(self,value): return (transform(value),None) On Jan 11, 7:16 pm, waTR wrote: > Is it possible to intercept form submission data

[web2py] Re: CRYPT() hmac.new and determining length of password

2010-01-11 Thread waTR
Is it possible to intercept form submission data before the SQLFORM form factory applies the "requires=" functions, in order to play with the data? On Jan 11, 4:33 pm, waTR wrote: > problem solved by looking in manual under DAL. > > did following: > test = db(query).select() > test[0].update_re

[web2py] Re: CRYPT() hmac.new and determining length of password

2010-01-11 Thread waTR
problem solved by looking in manual under DAL. did following: test = db(query).select() test[0].update_record(password=newpass) original problem was to do with pass auth, not db update (db was updating fine with previous code). On Jan 11, 4:07 pm, waTR wrote: > followup problem is for some

[web2py] Re: CRYPT() hmac.new and determining length of password

2010-01-11 Thread waTR
followup problem is for some reason I cannot update the password in the DB. I am doing db(query).update(password = newpass), however, it does not change the password for some reason... On Jan 11, 3:11 pm, mdipierro wrote: > db.table.field.requires=[IS_LENGTH(20),CRYPT(key)] > > In this case I

[web2py] Re: CRYPT() hmac.new and determining length of password

2010-01-11 Thread mdipierro
db.table.field.requires=[IS_LENGTH(20),CRYPT(key)] In this case IS_LENGTH checks the length of the password before it is crypted (validators are filters and they are executed in order). You may also want to look into IS_STRONG as an alternative to IS_LENGTH On Jan 11, 5:01 pm, waTR wrote: > I h