Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62261

URL validation in RepositoryBrowser is too strict / *.corp URLs should be valid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None

      The URL validation in the the repository browser settings is too strict and it treats e.g *.corp domains as invalid.

      Steps to reproduce:

      1. Configure repository browser 'gittiles' for a job
      2. Enter https://somehost.myorg.corp/foo/bar as URL
      3. -> "Invalid URL"

      This is due to the way org.apache.commons.validator.routines.UrlValidator treats domain names and the fact that .corp, .home, and .mail domains are officially declared as "off limits" to be part of the global DNS system.

      In the light of arbitrary top-level domains these days it makes no sense anymore to have such strict domain validation.

      Also, local hostnames should be valid, too. Locally-hosted SCM instances is nothing unusual.

      For these reasons, UrlValidator.ALLOW_LOCAL_URLS should be used to relax host/domain name validation.

            rishabhbudhouliya Rishabh Budhouliya
            sratz Sebastian Ratz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: