Fixed in trunk. This does not happen on incorrect password. This happens if 
password is NULL in database which should not happen.

On Monday, 17 September 2012 06:52:08 UTC-5, rochacbruno wrote:
>
> When user password is incorrect I am getting this
>
>
> *File /home/www-data/web2py/gluon/validators.py in __eq__ at line 2596* 
> código argumentos variáveis 
>  Function argument list 
>
> (self=<gluon.validators.LazyCrypt object>, stored_password=None)
>  Code listing 
>
> 2591.
> 2592.
> 2593.
> 2594.
> 2595.
> 2596.
>
> 2597.
> 2598.
> 2599.
> 2600.
>
>                 key = self.crypt.key.split(':')[1]
>
>
>             else:
>                 key = self.crypt.key
>
>
>         else:
>             key = ''
>
>
>         if stored_password.count('$')==2:
>
>
>             (digest_alg, salt, hash) = stored_password.split('$')
>
>
>             h = simple_hash(self.password, key, salt, digest_alg)
>
>
>             temp_pass = '%s$%s$%s' % (digest_alg, salt, h)
>
>
>         else: # no salting
>
>  Variables  stored_password.count undefined  stored_password None
>
>
> Traceback (most recent call last):
>   File "/home/www-data/web2py/gluon/restricted.py", line 209, in restricted
>
>
>     exec ccode in environment
>   File "/home/www-data/web2py/applications/init/controllers/person.py" 
> <https://li284-252.members.linode.com/admin/edit/init/controllers/person.py>, 
> line 173, in <module>
>
>
>   File "/home/www-data/web2py/gluon/globals.py", line 186, in <lambda>
>
>
>     self._caller = lambda f: f()
>
>
>   File "/home/www-data/web2py/applications/init/controllers/person.py" 
> <https://li284-252.members.linode.com/admin/edit/init/controllers/person.py>, 
> line 116, in account
>
>
>     person = Person("account")
>   File "applications/init/modules/handlers/base.py", line 43, in __init__
>
>
>     self.__getattribute__(hook)()
>   File "applications/init/modules/handlers/person.py", line 740, in account
>
>
>     self.context.form = self.db.auth()
>
>
>   File "/home/www-data/web2py/gluon/tools.py", line 1197, in __call__
>
>
>     return getattr(self,args[0])()
>
>
>   File "/home/www-data/web2py/gluon/tools.py", line 1967, in login
>
>
>     if form.vars.get(passfield, '') == temp_user[passfield]:
>
>
>   File "/home/www-data/web2py/gluon/validators.py", line 2596, in __eq__
>
>
>     if stored_password.count('$')==2:
>
> AttributeError: 'NoneType' object has no attribute 'count'
>
>
>
>
>
>
> *Bruno Cezar Rocha** - @rochacbruno*
> rocha...@gmail.com <javascript:> | Mobile: +55 (11) 99210-8821
> www.CursoDePython.com.br | www.rochacbruno.com.br
> Blog: App news reading 
> (portuguese)<http://rochacbruno.com.br/app-news-reading-portuguese/>
>   Get a signature like this. 
> <http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
>  Click 
> here.<http://r1.wisestamp.com/r/landing?promo=18&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_18>
>    
>
>  

-- 



Reply via email to