Skip to content

Fix Traceback participant.json_upload #3899

Backlog

Description

@m-schieder
INFO:openslides_backend.shared.handlers.base_handler:Performing action participant.json_upload.
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/gunicorn/workers/gthread.py", line 516, in handle
    return self._keepalive_after(conn, self.handle_request(req, conn))
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/gunicorn/workers/gthread.py", line 712, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/http/application.py", line 164, in __call__
    return self.wsgi_application(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/http/application.py", line 154, in wsgi_application
    response = self.dispatch_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/http/application.py", line 103, in dispatch_request
    response_body, access_token = view_instance.dispatch(request)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/http/views/base_view.py", line 121, in dispatch
    return func(request)
           ^^^^^^^^^^^^^
  File "/app/openslides_backend/http/views/action_view.py", line 49, in action_route
    response = handle_action_in_worker_thread(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/action/action_worker.py", line 75, in handle_action_in_worker_thread
    raise action_worker_thread.exception
  File "/app/openslides_backend/action/action_worker.py", line 248, in run
    self.response = self.handler.handle_request(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/action/action_handler.py", line 153, in handle_request
    results = self.execute_write_requests(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/action/action_handler.py", line 273, in execute_write_requests
    write_requests, data = get_write_requests(*args)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/action/action_handler.py", line 323, in parse_actions
    write_request, results = self.perform_action(
                             ^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/action/action_handler.py", line 371, in perform_action
    write_request, results = action.perform(
                             ^^^^^^^^^^^^^^^
  File "/app/openslides_backend/action/actions/meeting_user/mixin.py", line 52, in perform
    return super().perform(action_data, user_id, internal, is_sub_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/openslides_backend/action/action.py", line 161, in perform
    self.validate_instance(instance)
  File "/app/openslides_backend/action/mixins/import_mixins.py", line 631, in validate_instance
    if entry[field].lower() in TRUE_VALUES:
       ^^^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'lower'

Activity

  1. luisa-beerboom commented on Nov 30, 2026

    @luisa-beerboom
    Member

    That looks like someone sent a usual-format payload to a backend instance instead of the expected csv-loaded json upload format where every value is supposed to be a string.

    I don't think our client would've sent that, my guess is that someone sent a custom request via curl.

    Nonetheless it may be prudent to make the backend throw a 400 if someone actually sends non-strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions