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

Credential IDs are not uniformly urlencoded for display in the Web UI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • credentials-plugin
    • None

      If a credential has special characters in its ID (e.g. /), the credential may not work or render properly in some parts of the Web UI.

      For example, when the credential is transformed into a link, the link is broken (404 Not Found) because the '/' characters in the ID are not transformed into '%2F'.

      This appears to be because there is no standardised urlencoding of credential IDs in the credentials API, so whether urlencoding happens or not is up to the concrete credentials providers.

      It just so happens that the default (local disk) credentials provider does this - I believe through calling `Util.rawEncode(id)` in the CredentialsWrapper class. But a provider which does not have this logic will produce broken credential links.

      I would propose that this logic should be moved up to the Credentials API so that it is done in one place, in a standardised way that applies to all providers.

            Unassigned Unassigned
            chriskilding Chris Kilding
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: