Actions
Issue #7066
closedDenial of Service in pulp-content when CONTENT_PATH_PREFIX is followed by a `/`
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 77
Quarter:
Description
when sending a request to ${CONTENT_PATH_PREFIX}/
(whatever CONTENT_PATH_PREFIX is set to, plus one extra slash) pulp-content enters an infinite loop. because:
>>> os.path.split('/path')
('/', 'path')
>>> os.path.split('/')
('/', '')
and hence the while loop in https://github.com/pulp/pulpcore/blob/master/pulpcore/content/handler.py#L152-L158 never reaches the exit condition of base
being empty (it stays /
)
Actions
don't go into an infinite loop when
CONTENT_PATH_PREFIX
is followed by/
this would cause
path
to start with a/
and becausebase
would never end up asNone
but stay as/
resulting in an infinite loop.fixes #7066