Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17187

spinner.gif coming from a webjar resource has an absolute URL when the descriptor is different from the initial request

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      To reproduce:

      tree.min.css contains the following at runtime:

      .jstree-ocl{background-image:url("http://localhost/xwiki/resources/icons/xwiki/spinner.gif?cache-version=1585234810000"); in tree.min.css
      

      When https://github.com/xwiki/xwiki-platform/blob/2359341cb50df1fc2df2d981ffad01b98a20f05a/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletURLFactory.java#L806 is called we have:

      The issue is that the original URL for the webjar thread is not empty (it contains http://localhost:8080), and since our default main wiki descriptor doesn't have the port set, it generates a URL with http://localhost/. Thus "!surl.startsWith(this.originalURL.toString()" is true.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: