Actions
Issue #3316
closedUpload is broken
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
The Content Serializer causes a 500 error on uploads.
http --form POST http://localhost:8000/api/v3/artifacts/ file@./foo.tar.gz
This returns a 500. It looks like `hexdigest()` requires a "length" argument. Here's the traceback in journalctl:
Jan 23 18:43:37 pulp3.dev pulp[22901]: django.request:ERROR: Internal Server Error: /api/v3/artifacts/
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/viewsets.py", line 95, in view
return self.dispatch(request, *args, **kwargs)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 494, in dispatch
response = self.handle_exception(exc)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 454, in handle_exception
self.raise_uncaught_exception(exc)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/views.py", line 491, in dispatch
response = handler(request, *args, **kwargs)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/mixins.py", line 20, in create
serializer.is_valid(raise_exception=True)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 236, in is_valid
self._validated_data = self.run_validation(self.initial_data)
File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/rest_framework/serializers.py", line 438, in run_validation
value = self.validate(value)
File "/home/vagrant/devel/pulp/pulpcore/pulpcore/app/serializers/content.py", line 97, in validate
digest = data['file'].hashers[algorithm].hexdigest()
TypeError: Required argument 'length' (pos 1) not found
Added by werwty almost 7 years ago
Added by werwty almost 7 years ago
Revision ad4c40a1 | View on GitHub
Only validate hash algorithms that the user can upload on the model.
Updated by werwty almost 7 years ago
- Status changed from NEW to MODIFIED
Applied in changeset pulp|ad4c40a1e73b84d9736920dbd97fab75a6c748a3.
Updated by bizhang almost 7 years ago
- Assignee set to bizhang
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Only validate hash algorithms that the user can upload on the model.
fixes #3316 https://pulp.plan.io/issues/3316