Project

Profile

Help

Issue #7124

closed

An internal server error is raised when appending slash at the end of the validate_token query option

Added by lmjachky almost 4 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 77
Quarter:

Description

Steps to reproduce the error:

  1. Sync from the repository library/busybox using the attached script.
  2. Publish the repository.
  3. Run the command:
$ http http://pulp3-source-fedora31.localhost.example.com/pulp/container/foo/manifests/1.32?validate_token=95ff034be16cc79d2a3acaee677b13c8d0c2389e2e7a0126c1f1c1a684fb455a:75b9ed6447ac9e5f86022233c2407e936deac664df0dee19047324fef2e8671c/
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Length: 55
Content-Type: text/plain; charset=utf-8
Date: Mon, 13 Jul 2020 10:47:08 GMT
Server: nginx/1.18.0

500 Internal Server Error

Server got itself in trouble
$ journalctl -u pulpcore-content.service

...

Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]: Traceback (most recent call last):
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:     resp = await task
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:   File "/usr/local/lib/pulp/lib64/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:     resp = await handler(request)
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:   File "/home/vagrant/devel/pulp_container/pulp_container/app/registry.py", line 134, in get_tag
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:     self._permit(request, distribution)
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:   File "/home/vagrant/devel/pulpcore/pulpcore/content/handler.py", line 209, in _permit
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:     guard.cast().permit(request)
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:   File "/home/vagrant/devel/pulp_container/pulp_container/app/models.py", line 447, in permit
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]:     digest = bytes.fromhex(hex_digest)
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]: ValueError: non-hexadecimal number found in fromhex() arg at position 64
Jul 13 10:47:08 pulp3-source-fedora31.localhost.example.com gunicorn[18367]: 127.0.0.1 [13/Jul/2020:10:47:08 +0000] "GET /pulp/container/foo/manifests/1.32?validate_token=95ff034be16cc79d2a3acaee677b13c8d0c2389e2e7a0126c1f1c1a684fb455a:75b9ed6447ac9e5f86022233c2407e936deac664df0dee19047324fef2e8671c/ HTTP/1.0" 500 225 "-" "HTTPie/2.2.0"


Files

dockersync-busybox.bash (878 Bytes) dockersync-busybox.bash lmjachky, 07/13/2020 12:51 PM

Also available in: Atom PDF