Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation for remote URL #296

Open
fao89 opened this issue Nov 10, 2021 · 0 comments
Open

Add validation for remote URL #296

fao89 opened this issue Nov 10, 2021 · 0 comments

Comments

@fao89
Copy link
Owner

fao89 commented Nov 10, 2021

Author: [email protected] ([email protected])

Redmine Issue: 8340, https://pulp.plan.io/issues/8340


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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment