Project

Profile

Help

Issue #8340

Updated by ipanova@redhat.com about 3 years ago

In various place in the sync pipeline pipelines we are checking for presence of trailing slash and adding it. 
 The proposal is to whether add a validation during remote creation so a trailing slash is required in the url or adding it automatically when saving the remote. 

 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 
 } 

 ```

Back