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

        Nikita Dubrovsky created issue -
        Donald Woods made changes -
        Field Original Value New Value
        Attachment P484-1.1.x-Rev652071.diff [ 12381051 ]
        Donald Woods made changes -
        Fix Version/s 1.1.6 [ 12313075 ]
        Fix Version/s 2.0.0 [ 12312914 ]
        Donald Woods made changes -
        Attachment P484-1.1.x-Rev652071.diff [ 12381051 ]
        Donald Woods made changes -
        Attachment P484-1.1.x-Rev652071.diff [ 12381105 ]
        Craig Doremus made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Craig Doremus made changes -
        Status Closed [ 6 ] Reopened [ 4 ]
        Resolution Fixed [ 1 ]
        Assignee Craig Doremus [ cdoremus ]
        Craig Doremus made changes -
        Affects Version/s 2.0-refactoring [ 12313313 ]
        Affects Version/s 2.0.0 [ 12312914 ]
        Fix Version/s 2.0-refactoring [ 12313313 ]
        Craig Doremus made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12429684 ] Default workflow, editable Closed status [ 12565065 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565065 ] jira [ 12585907 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development