Project

Profile

Help

Issue #8340

Add validation for remote URL

Added by ipanova@redhat.com 8 months ago. Updated 8 months ago.

Status:
NEW
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:
Quarter:

Description

It would be good to add any sort of validation for the url. Right now we are not checking even the validity of the url schema.

(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 ~]$ http POST :24817/pulp/api/v3/remotes/rpm/rpm/  name=lala url=lala
HTTP/1.1 201 Created
Access-Control-Expose-Headers: Correlation-ID
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 529
Content-Type: application/json
Correlation-ID: 22466def5b17436386ce6286f58b0307
Date: Thu, 04 Mar 2021 12:07:36 GMT
Location: /pulp/api/v3/remotes/rpm/rpm/2d554142-faa0-4fe6-bea5-83082806ac03/
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "ca_cert": null,
    "client_cert": null,
    "client_key": null,
    "connect_timeout": null,
    "download_concurrency": 10,
    "name": "lala",
    "password": null,
    "policy": "immediate",
    "proxy_url": null,
    "pulp_created": "2021-03-04T12:07:36.223237Z",
    "pulp_href": "/pulp/api/v3/remotes/rpm/rpm/2d554142-faa0-4fe6-bea5-83082806ac03/",
    "pulp_labels": {},
    "pulp_last_updated": "2021-03-04T12:07:36.223260Z",
    "rate_limit": null,
    "sles_auth_token": null,
    "sock_connect_timeout": null,
    "sock_read_timeout": null,
    "tls_validation": true,
    "total_timeout": null,
    "url": "lala",
    "username": null
}

History

#1 Updated by ipanova@redhat.com 8 months ago

  • Description updated (diff)

#2 Updated by ipanova@redhat.com 8 months ago

I forgot about the mirrorlist. The proposal for the trailing slash validation will not workout. We should at least still do some sanity check of the url, like url schema.

#3 Updated by dalley 8 months ago

  • Project changed from RPM Support to Pulp
  • Subject changed from Add validation for presence of traling slash in the url during remote creation to Add validation for remote URL
  • Triaged changed from No to Yes

#4 Updated by dalley 8 months ago

  • Triaged changed from Yes to No

#5 Updated by ipanova@redhat.com 8 months ago

  • Description updated (diff)

#6 Updated by fao89 8 months ago

  • Triaged changed from No to Yes

Please register to edit this issue

Also available in: Atom PDF