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

a file:// update center will always be offline

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      windows
    • Similar Issues:

      Description

      The code in hudson.model.UpdateCenter$UpdateCenterConfiguration.checkUpdateCentermakes blind assumptions about the protocol and validity of an update center URL.

      Blindly appending a string to a URL does not necessarily a valid URL for connection checking make.

      For example the URL could be a file based url
      and the URL file://c:/some/path/to/updates.json will become file://c:/some/path/to/updates.json?uctest

      Later on the URL is used in hudson.model.UpdateCenter.UpdateCenterConfiguration.test connection(URL) - and if it is not a http URL it will try Util.copyStreamAndClose(connection.getInputStream(),new NullOutputStream()); which on windows will fail as it will try and open c:\some\path\to\updates.json?uctest which will fail with an exception - and then fail the update check.

              public void checkUpdateCenter(ConnectionCheckJob job, String updateCenterUrl) throws IOException {
                  testConnection(new URL(updateCenterUrl + "?uctest"));
              }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                teilo James Nord
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: