Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2978

Bridge ExternalContextImpl.redirect(String url) assumes that the specified URL has has non-encoded query parameters

    Details

      Description

      Bridge TCK TestPage179 (redirectRenderPRP1Test) is failing in Pluto 3.0 because ExternalContextImpl.redirect(String url) assumes that the specified URL has has non-encoded query parameters. This is an incorrect assumption since the Portlet Spec leaves the format of Portlet URLs as an implementation detail. For example, portlet containers may obfuscate Portlet URLs as a design option. Another example would be a FriendlyURL that contains implied parameters.

      In Pluto 2.0, the _facesViewIdRender URL parameter did not have any special encoding and was easily determined by examining the query-string component of the URL:

      /pluto/portal/TestPage179/
      __accom0x2liferay0x2faces0x2test0x2bridge0x2tck0x2main0x2portlet0x2chapter60x110x130x11Tests-redirectRenderPRP1Test-portlet!471675090%7C0/
      __pmcom0x2liferay0x2faces0x2test0x2bridge0x2tck0x2main0x2portlet0x2chapter60x110x130x11Tests-redirectRenderPRP1Test-portlet!471675090%7C0_view/
      __wscom0x2liferay0x2faces0x2test0x2bridge0x2tck0x2main0x2portlet0x2chapter60x110x130x11Tests-redirectRenderPRP1Test-portlet!471675090%7C0_normal/
      __sp_testPRP/
      redirectRenderPRP1Test?_facesViewIdRender=%2Ftests%2FredirectTestResultRenderCheck.jsf
      

      But in Pluto 3.0, the facesViewIdRender URL parameter is encoded as a _action parameter that cannot be determined by examining the query-string component of the URL:

      /pluto/portal/TestPage179/
      __pdcom.liferay.faces.test.bridge.tck.main.portlet.chapter6_1_3_1Tests-redirectRenderPRP1Test-portlet%21471675090%7C0;0/
      __ac0/
      __av0;_facesViewIdRender:%2Ftests%2FredirectTestResultRenderCheck.jsf/
      __sp0;0;testPRP:redirectRenderPRP1Test
      

      The solution to this problem in the Apache MyFaces Portlet Bridge was to save-off the query string as a request attribute in the call to PortletExternalContextImpl.encodeActionURL(String uri) and then retrieve the query-string request attribute in the call to PortletExternalContextImpl.redirect(String url)).

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            neil.griffin Neil Griffin
            Reporter:
            neil.griffin Neil Griffin
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Subcomponents