XWiki Platform
  1. XWiki Platform
  2. XWIKI-479

Redirect loop if xwiki.virtual.redirect is not specified, and it is commented out and has unhelpful value by default.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.9.1252
    • Fix Version/s: None
    • Component/s: Model
    • Labels:
      None
    • keywords:
      xwiki virtual redirect loop
    • Similar issues:
      XWIKI-3330Redirect loop in xwiki when running with apache httpd
      XWIKI-9790Specify in the UI the non-default values for Advanced Options
      XWIKI-4899Add Model API to get default Entity Reference values
      XWIKI-8920The user is redirected to a weird URL when a wiki does not exist
      XWIKI-3480Include the default value in the macro parameter descriptor
      XWIKI-7224XWikiPreferences in view mode does no not redirect to admin mode
      XWIKI-4263Include macro should expose the default value of "context" property
      XWIKI-1124Only if in the style macro has icon parameter then apply stylemacro class for the default value of class parameter.(to show icon image)
      XWIKI-8586The class editor doesn't save the default values for title and content fields in the template

      Description

      If xwiki.virtual.redirect is not specified for a virtual wiki, attempting to access a subdomain that does not correspond to a wiki causes the browser to be redirected repeatedly to the same invalid url.

      xwiki.virtual.redirect is commented out and has an unhelpful value by default.
      (The default is ...127.0.0.1/..., but a valid external URL is needed.)

        Issue Links

          Activity

          Hide
          Vincent Massol added a comment -

          Thomas, could you check if this is still happening?

          Thanks

          Show
          Vincent Massol added a comment - Thomas, could you check if this is still happening? Thanks
          Hide
          Thomas Mortagne added a comment -

          Actually if xwiki.virtual.redirect is not specified, HttpServletResponse.sendRedirect() is called with null that seams to be understood by browser as no redirection (it stop to load a show blank page).

          Show
          Thomas Mortagne added a comment - Actually if xwiki.virtual.redirect is not specified, HttpServletResponse.sendRedirect() is called with null that seams to be understood by browser as no redirection (it stop to load a show blank page).
          Hide
          Thomas Mortagne added a comment -

          But if the redirect is specified on a not found subwiki/domain name, it will make infinite loop tryin each time to load it.

          Show
          Thomas Mortagne added a comment - But if the redirect is specified on a not found subwiki/domain name, it will make infinite loop tryin each time to load it.
          Hide
          Thomas Mortagne added a comment -

          I propose to redirect to main wiki home page if there is any probleme (redirect is same url than current one and redirect is not set) and if main wiki home page is not reachable then call sendRedirect will null. WDYT ?

          Show
          Thomas Mortagne added a comment - I propose to redirect to main wiki home page if there is any probleme (redirect is same url than current one and redirect is not set) and if main wiki home page is not reachable then call sendRedirect will null. WDYT ?
          Hide
          Sergiu Dumitriu added a comment -

          Don't sendRedirect with null. If the requested URL is not in the main wiki, then first send there. If the requeste & not found URL belongs to the main wiki, then somethins is terribly wrong. There can't NOT be a main wiki. Better output a static page with a 500 status, so that the user at least sees that something is wrong, instead of a blank page.

          Show
          Sergiu Dumitriu added a comment - Don't sendRedirect with null. If the requested URL is not in the main wiki, then first send there. If the requeste & not found URL belongs to the main wiki, then somethins is terribly wrong. There can't NOT be a main wiki. Better output a static page with a 500 status, so that the user at least sees that something is wrong, instead of a blank page.
          Hide
          Eduard Moraru added a comment -

          See the duplicated issue. The problem has been resolved with the removal of xwiki.virtual.redirect and its replacement with a different mechanism.

          Show
          Eduard Moraru added a comment - See the duplicated issue. The problem has been resolved with the removal of xwiki.virtual.redirect and its replacement with a different mechanism.

            People

            • Assignee:
              Eduard Moraru
              Reporter:
              Trevor Cox
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: