Repository navigation
Closed
Labels
Description
There seems to be an error with the datasets 'file_size' Key, both in develop and master branches. It triggers when uploading a bundle competition.
2024-06-09 09:58:59 django-1 | Internal Server Error: /api/datasets/
2024-06-09 09:58:59 django-1 | Traceback (most recent call last):
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272506+00:00 [info] <0.254.0> Running boot step rabbit_exchange_type_headers defined by app rabbit
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272605+00:00 [info] <0.254.0> Running boot step rabbit_exchange_type_topic defined by app rabbit
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272658+00:00 [info] <0.254.0> Running boot step rabbit_mirror_queue_mode_all defined by app rabbit
2024-06-09 09:58:59 django-1 | response = get_response(request)
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272684+00:00 [info] <0.254.0> Running boot step rabbit_mirror_queue_mode_exactly defined by app rabbit
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
2024-06-09 09:58:59 django-1 | response = self.process_exception_by_middleware(e, request)
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
2024-06-09 09:58:59 django-1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272700+00:00 [info] <0.254.0> Running boot step rabbit_mirror_queue_mode_nodes defined by app rabbit
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
2024-06-09 09:58:59 django-1 | return view_func(*args, **kwargs)
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272771+00:00 [info] <0.254.0> Running boot step rabbit_priority_queue defined by app rabbit
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272803+00:00 [info] <0.254.0> Priority queues enabled, real BQ is rabbit_variable_queue
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272844+00:00 [info] <0.254.0> Running boot step rabbit_queue_location_client_local defined by app rabbit
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272875+00:00 [info] <0.254.0> Running boot step rabbit_queue_location_min_masters defined by app rabbit
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272891+00:00 [info] <0.254.0> Running boot step rabbit_queue_location_random defined by app rabbit
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272906+00:00 [info] <0.254.0> Running boot step kernel_ready defined by app rabbit
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/rest_framework/viewsets.py", line 116, in view
2024-06-09 09:58:59 django-1 | return self.dispatch(request, *args, **kwargs)
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272913+00:00 [info] <0.254.0> Running boot step rabbit_sysmon_minder defined by app rabbit
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 495, in dispatch
2024-06-09 09:58:59 django-1 | response = self.handle_exception(exc)
2024-06-09 09:53:40 rabbit-1 | 2024-06-09 06:53:40.272968+00:00 [info] <0.254.0> Running boot step rabbit_epmd_monitor defined by app rabbit
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 455, in handle_exception
2024-06-09 09:58:59 django-1 | self.raise_uncaught_exception(exc)
2024-06-09 09:58:59 django-1 | File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 492, in dispatch
2024-06-09 09:58:59 django-1 | response = handler(request, *args, **kwargs)
2024-06-09 09:58:59 django-1 | File "/app/src/apps/api/views/datasets.py", line 85, in create
2024-06-09 09:58:59 django-1 | file_size = float(request.data['file_size'])
Activity
liviust commentedon Jun 9, 2024
Interestingly enough, the error goes away if you first upload a submission via the Resources menu and then create a competition. Therefore, the above error happens when you compile the two branches from scratch and upload a competition as the first command.
After you upload a submission, the error goes away, and you can upload a competition bundle. However, when uploading a submission to the newly created competition, you'll get:
And then:
liviust commentedon Jun 9, 2024
Also, the

secret_keyand few other properties should not be accessible to unauthorized users. I was surprised to be able to extract it using the browser console, as it is printed there. You can do this for any competition, even if you are not logged in. If an organizer decides to unpublish a competition, the users can still access it via the secret key which cancels the logic to be able to unpublish it.Another concerning info that is leaked is the whitelist_emails.
Didayolo commentedon Jun 10, 2024
Maybe related to:
Indeed:
ihsaan-ullah commentedon Jul 18, 2024
I cannot reproduce the issue you have mentioned about
file_size. Here is what I did:docker-compose up -ddocker-compose exec django ./manage.py migratedocker-compose exec django ./manage.py collectstatic --noinputlocalhostI see no error in django container
@liviust if you can reproduce the issue, please share the steps here.
ihsaan-ullah commentedon Jul 18, 2024
Todos:
Solved by: Competition console prints removed #1539
ihsaan-ullah commentedon Feb 19, 2025
@liviust can you reproduce this bug of
file_size?Didayolo commentedon Apr 23, 2025
I close this issue because:
Feel free to re-open it if relevant.