Internal server error when opening "settings" when Webdav password set (v7.1.3)

Hi

Since the update form 7.0.5 to 7.1.3, the “settings” page doesn’t work anymore when a user previously had set an Webdav password. If the user didn’t set one, the settings page works fine.

Error log:

2020-03-31 15:20:45,596 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /profile/
Traceback (most recent call last):
File “/home/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/home/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/home/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/home/seafile/seafile-server-7.1.3/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/seafile/seafile-server-7.1.3/seahub/seahub/auth/decorators.py”, line 27, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/home/seafile/seafile-server-7.1.3/seahub/seahub/profile/views.py”, line 82, in edit_profile
decoded = UserOptions.objects.get_webdav_decoded_secret(username)
File “/home/seafile/seafile-server-7.1.3/seahub/seahub/options/models.py”, line 267, in get_webdav_decoded_secret
aes = AESPasswordHasher()
File “/home/seafile/seafile-server-7.1.3/seahub/seahub/utils/hasher.py”, line 39, in init
self.cipher = AES.new(secret.encode(‘utf-8’), AES.MODE_ECB)
AttributeError: ‘NoneType’ object has no attribute ‘new’

Still getting the error on 7.1.4:

[ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /profile/
Traceback (most recent call last):
File “/home/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/home/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/home/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/home/seafile/seafile-server-7.1.4/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/seafile/seafile-server-7.1.4/seahub/seahub/auth/decorators.py”, line 27, in _wrapped_view
return view_func(request, *args, **kwargs)
File “/home/seafile/seafile-server-7.1.4/seahub/seahub/profile/views.py”, line 82, in edit_profile
decoded = UserOptions.objects.get_webdav_decoded_secret(username)
File “/home/seafile/seafile-server-7.1.4/seahub/seahub/options/models.py”, line 267, in get_webdav_decoded_secret
aes = AESPasswordHasher()
File “/home/seafile/seafile-server-7.1.4/seahub/seahub/utils/hasher.py”, line 39, in init
self.cipher = AES.new(secret.encode(‘utf-8’), AES.MODE_ECB)
AttributeError: ‘NoneType’ object has no attribute ‘new’