TypeError: sha1() argument 1 must be string or buffer, not None
Exception when processing https://karl.soros.org/profiles/iespaillat/change_password.html?password_expired=true
Referer: https://karl.soros.org/profiles/iespaillat/change_password.html?password_expired=true
Traceback (most recent call last):
File "/srv/osfkarl/production/84/eggs/pyramid-1.2.1-py2.7.egg/pyramid/tweens.py", line 17, in excview_tween
response = handler(request)
File "/srv/osfkarl/production/84/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 107, in tm_tween
return response
File "/srv/osfkarl/production/84/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 75, in __exit__
return self._retry_or_raise(t, v, tb)
File "/srv/osfkarl/production/84/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 60, in _retry_or_raise
reraise(t, v, tb) # otherwise reraise the exception
File "/srv/osfkarl/production/84/eggs/pyramid_tm-0.5-py2.7.egg/pyramid_tm/__init__.py", line 100, in tm_tween
response = handler(request)
File "/srv/osfkarl/production/84/eggs/pyramid-1.2.1-py2.7.egg/pyramid/router.py", line 153, in handle_request
response = view_callable(context, request)
File "/srv/osfkarl/production/84/eggs/pyramid-1.2.1-py2.7.egg/pyramid/config/views.py", line 523, in __call__
return view(context, request)
File "/srv/osfkarl/production/84/eggs/pyramid-1.2.1-py2.7.egg/pyramid/config/views.py", line 266, in attr_view
return view(context, request)
File "/srv/osfkarl/production/84/eggs/pyramid-1.2.1-py2.7.egg/pyramid/config/views.py", line 239, in predicate_wrapper
return view(context, request)
File "/srv/osfkarl/production/84/eggs/pyramid-1.2.1-py2.7.egg/pyramid/config/views.py", line 186, in _secured_view
return view(context, request)
File "/srv/osfkarl/production/84/eggs/pyramid-1.2.1-py2.7.egg/pyramid/config/views.py", line 292, in rendered_view
result = view(context, request)
File "/srv/osfkarl/production/84/eggs/pyramid_formish-0.2a1-py2.7.egg/pyramid_formish/zcml.py", line 171, in __call__
return submitted(request, form, controller, self.action, controller)
File "/srv/osfkarl/production/84/eggs/pyramid_formish-0.2a1-py2.7.egg/pyramid_formish/zcml.py", line 206, in submitted
converted = form.validate(request, check_form_name=False)
File "/srv/osfkarl/production/84/eggs/formish-0.8.5.3+agendaless-py2.7.egg/formish/forms.py", line 1019, in validate
data = self._validate(request, skip_read_only_defaults=skip_read_only_defaults)
File "/srv/osfkarl/production/84/eggs/formish-0.8.5.3+agendaless-py2.7.egg/formish/forms.py", line 1039, in _validate
self.structure.attr.validate(data)
File "/srv/osfkarl/production/84/eggs/schemaish-0.5.6-py2.7.egg/schemaish/attr.py", line 372, in validate
attr.validate(value.get(name))
File "/srv/osfkarl/production/84/eggs/schemaish-0.5.6-py2.7.egg/schemaish/attr.py", line 89, in validate
self.validator(value)
File "/srv/osfkarl/production/84/eggs/validatish-0.6.4-py2.7.egg/validatish/validator.py", line 253, in __call__
validator(v)
File "/srv/osfkarl/production/84/eggs/karl-4.19-py2.7.egg/karl/views/forms/validators.py", line 119, in __call__
enc = get_sha_password(v)
File "/srv/osfkarl/production/84/eggs/repoze.whoplugins.zodb-1.0.1-py2.7.egg/repoze/who/plugins/zodb/users.py", line 19, in get_sha_password
return 'SHA1:' + _sha(password).hexdigest()
TypeError: sha1() argument 1 must be string or buffer, not None
This didn't touch the new code. Seems like a pre-existing bug triggered when sending an empty password.
Fixed.