Project

Profile

Help

Issue #3024

closed

content creation API does not validate the hostname portion of Artifact URL

Added by dkliban@redhat.com about 7 years ago. Updated over 5 years ago.

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

Description

content.json has the following:

{
  "digest": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
  "path": "foo7.bar.gz",
  "artifacts": {"foo.bar.gz":"http://localhost:1234/api/v3/artifacts/7d39e3f6-535a-4b6e-81e9-c83aa56aa19e/"}
}
http POST http://localhost:8000/api/v3/content/example/ < content.json

This results in a succesful creation of content even though the port in the Artifact URL does not match the port on which Pulp is running.

This regression was introduced[0] when fixing another problem with the API.

[0] https://github.com/pulp/pulp/pull/3161/files

Also available in: Atom PDF