Pluto
  1. Pluto
  2. PLUTO-484

PortletURLImpl.setSecure() throws PortletSecurityException when PortletURLProvider.isSecureSupported() returns true

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.5, 2.0-refactoring, 2.0.0
    • Fix Version/s: 2.0-refactoring, 1.1.6, 2.0.0
    • Component/s: portlet container
    • Labels:
      None
    • Environment:
      Tomcat 5.5.26

      Description

      The method setSecure() on org.apache.pluto.internal.impl.PortletURLImpl is implemented as follows:

      public void setSecure(boolean secure) throws PortletSecurityException {
      PortletURLProvider urlProvider = container
      .getRequiredContainerServices()
      .getPortalCallbackService()
      .getPortletURLProvider(servletRequest, internalPortletWindow);
      if(urlProvider.isSecureSupported())

      { throw new PortletSecurityException("Secure URLs not supported."); }
      }

      The problem is that if the URL provider supports secure URLs, an exception is thrown. This code should be changed as follows:

      public void setSecure(boolean secure) throws PortletSecurityException {
      if(!secure) { return; }
      PortletURLProvider urlProvider = container
      .getRequiredContainerServices()
      .getPortalCallbackService()
      .getPortletURLProvider(servletRequest, internalPortletWindow);
      if(urlProvider.isSecureSupported()) { urlProvider.setSecure(); } else { throw new PortletSecurityException("Secure URLs not supported."); }

      }

        Activity

        Hide
        Donald Woods added a comment -

        Patch created against 1.1.x branch at Rev652071

        Show
        Donald Woods added a comment - Patch created against 1.1.x branch at Rev652071
        Hide
        Donald Woods added a comment -

        Updated patch crated against 1.1.x branch (Rev643117), which includes a required update to pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java

        Verified by using latest Geronimo 2.1.2 build and access our Admin Console via HTTPS (port 8443 in our server.)

        Show
        Donald Woods added a comment - Updated patch crated against 1.1.x branch (Rev643117), which includes a required update to pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java Verified by using latest Geronimo 2.1.2 build and access our Admin Console via HTTPS (port 8443 in our server.)
        Hide
        Craig Doremus added a comment -

        Applied patch to 1.1.x branch, trunk and pluto-2.0-spi-refactoring branch in SVN revs 662392, 662393 and 662396. Thanks Nikita.

        Show
        Craig Doremus added a comment - Applied patch to 1.1.x branch, trunk and pluto-2.0-spi-refactoring branch in SVN revs 662392, 662393 and 662396. Thanks Nikita.
        Hide
        Craig Doremus added a comment -

        This change causes an Exception to be thrown at line 189 in BaseURLImpl (of SVN trunk) when Pluto is deployed in Tomcat.

        Show
        Craig Doremus added a comment - This change causes an Exception to be thrown at line 189 in BaseURLImpl (of SVN trunk) when Pluto is deployed in Tomcat.
        Hide
        Craig Doremus added a comment -

        Applied fix to recently reported Exception in trunk in SVN rev 682097, 2.0-refactoring branch in SVN rev 682098, and in pluto 1.1.x branch in SVN rev 682100.

        Show
        Craig Doremus added a comment - Applied fix to recently reported Exception in trunk in SVN rev 682097, 2.0-refactoring branch in SVN rev 682098, and in pluto 1.1.x branch in SVN rev 682100.

          People

          • Assignee:
            Craig Doremus
            Reporter:
            Nikita Dubrovsky
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development