Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1442

ApacheURLLister does not properly handle links with URL encoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.2.0
    • 2.5.0-rc1
    • Core
    • None
    • Ant 1.8.0, Java 6

    Description

      This element of the listing

                  } else {
                      // text is not truncated, so it must match the url after stripping optional
                      // trailing slashes
                      String strippedHref = href.endsWith("/") ? href.substring(0, href.length() - 1) : href;
                      String strippedText = text.endsWith("/") ? text.substring(0, text.length() - 1) : text;
                      if (!strippedHref.equalsIgnoreCase(strippedText)) {
                          continue;
                      }
                  }
      

      checks that the href text matches the displayed text of the link.

      When we altered our version strings to use Debian package syntax, our version numbers now include the of a colon ":". So, when this logic now is looking for links on the module page, the link for the subdirectory of the version is no longer being returned by this class because this equality check is now failing. We are using Jenkins build artifact pages and an Ivy URL resolver to locate these modules/versions and the issue is that due to the colon, the href value is URLEncoded and the text shows it plain. This now falls to the continue in the above code and we don't get the version URL in the list this class is supposed to return.

      Example <a> tag that should work and no longer is now that our versions include the ":". (%3A is URLEncode of : )
      <a href="1%3A2013.09.J821">1:2013.09.J821</a>

      Attachments

        Issue Links

          Activity

            People

              twogee Gintas Grigelionis
              netappbluedevil Daniel Holmes
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: