Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): ab632275417e2c95eb78f9ad458674be3d0597a8 How reproducible: Steps to Reproduce: 1. Create new Provider (Red Hat) 2. For Repository URL, enter "#(*%$))@#:<>{}[)]" Actual results: Provider created Expected results: Error: "Validation failed: URL is invalid." Additional info:
make sure we check on the Repo URL as well
Service now validates the repository URL, and will not allow creation until valid URL is entered. requires inclusion of "http://" to validate. commit: 41db66a7ea416ecdd16945da1f367558bcd98564
first fix broke creation of a custom provider. It would disallow creation because no repository URL was given. fixed: RedHat provider correctly validates URLs while not giving an error when creating a custom provider. commit: b68d908aadb76175cf86452e54bbec8eabcb66d5
I'm going to have dev take a second look at this. Checking for "starts with 'http://'" is not right. It disallows valid urls (file://, https://, etc) while allowing invalid ones: ( http://+++, http://localhost:blah, http://localhost:10:20:30, etc). Let's grab a ruby lib to actually validate the url, no need to reinvent the wheel. It's probably part of the standard lib.
Sorry, my previous comment was confusing. It's already using Ruby's URI lib to validate repo URL. I was stating that I noticed URI lib required inclusion of "http://" (or some other protocol) meaning "http://redhat.com" would pass, while "redhat.com" would not. Currently Provider only validates https protocol, but others can be added very easily (file, http, etc.) I was instructed to only allow https for right now.
Fails QA - Steps: Go to Providers, edit the 'red hat' provider. Change URL to "https://". Save. URL is updated, should be rejected, it is an invalid URL. It also fails when creating providers (you will have to delete "red hat" to create a new one, only one is allowed). It also fails validating urls on Repositories. katello-0.1.48-1.git.19.66d6564.fc14.noarch
hopefully now validates URLs better. added tests to check. commit 7618118893a92d7f2d67031471589a69826b127e
Still allows URL of "https://" when creating a repository. katello-0.1.49-1.git.49.ccf620e.fc14.noarch
It is no longer an issue. Fixed in katello-0.1.57-1-17-ge6cd995.