heviat / Mailu-OpenID

Mailu mailservice extended by OpenID Connect user authentication
https://mailu.io
Other
12 stars 7 forks source link

Internal Server Error when trying to save user settings #10

Open murdantix opened 3 days ago

murdantix commented 3 days ago

Bug Description

Description

Hello,

I have installed and configured Mailu to work with Shibboleth-IDP using the OpenID Plugin. Everything is working well until I tried to change the displayed name. When I try to save the modifications, I receive the following error:

image

I wish that someone can help me with that

Thank you

Replication Steps

  1. Log in to the account
  2. Navigate to /admin/user/settings
  3. Modify any textbox, checkbox or slider value
  4. Click "Save settings"

Diagnostic Information

Relevant log output

root@mail:/mailu# docker container logs mailu-admin-1
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
[2024-11-25 10:50:55,195] ERROR in app: Exception on /admin/user/settings [POST]
Traceback (most recent call last):
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask_restx/api.py", line 672, in error_router
return original_handler(e)
^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/ui/access.py", line 29, in wrapper
return callback(function, args, kwargs, dargs, dkwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/ui/access.py", line 20, in callback
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/ui/views/users.py", line 96, in user_settings
form.forward_destination.data = form.forward_destination.data.replace(" ","").split(",")
AttributeError: 'list' object has no attribute 'replace'
[2024-11-25 10:58:31,983] ERROR in app: Exception on /admin/user/settings [POST]
Traceback (most recent call last):
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask_restx/api.py", line 672, in error_router
return original_handler(e)
^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/venv/lib/python3.11/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/ui/access.py", line 29, in wrapper
return callback(function, args, kwargs, dargs, dkwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/ui/access.py", line 20, in callback
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/mailu/ui/views/users.py", line 96, in user_settings
form.forward_destination.data = form.forward_destination.data.replace(" ","").split(",")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'replace'
Wombosvideo commented 3 days ago

Thank you for bringing this to our attention. A bugfix will be provided as soon as possible