Issue #3476
Base path validation on distributions doesn't work depending on your hostname
Description
Ichimonji10 discovered that perfectly valid hostnames weren't being accepted after this PR got merged:
https://github.com/pulp/pulp/pull/3371
We're using django's URLValidator which apparently looks for a dot in the hostname:
https://github.com/django/django/blob/master/django/core/validators.py#L86
That is except if you are using localhost:
https://github.com/django/django/blob/master/django/core/validators.py#L93
Associated revisions
Revision 855d2025
View on GitHub
Fixing problems with bad hostnames
Looks like django requires certain features of hostnames like a "." so
using get_host()
was not a good idea. Using a known valid hostname
instead.
History
#1
Updated by daviddavis almost 3 years ago
- Status changed from NEW to POST
- Assignee set to daviddavis
#2
Updated by daviddavis almost 3 years ago
- Tags Pulp 3, Pulp 3 MVP added
#3
Updated by dalley almost 3 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 34
#4
Updated by daviddavis almost 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp|855d202563994f42398ea3cbf5db81d32dde75be.
#5
Updated by dkliban@redhat.com almost 3 years ago
- Sprint/Milestone set to 3.0.0
#6
Updated by bmbouter over 1 year ago
- Tags deleted (
Pulp 3, Pulp 3 MVP)
#7
Updated by bmbouter about 1 year ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Please register to edit this issue
Fixing problems with bad hostnames
Looks like django requires certain features of hostnames like a "." so using
get_host()
was not a good idea. Using a known valid hostname instead.fixes #3476 https://pulp.plan.io/issues/3476