Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-484

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.5, 2.0-refactoring, 2.0.0
    • 2.0-refactoring, 1.1.6, 2.0.0
    • portlet container
    • None
    • 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."); }

      }

      Attachments

        1. P484-1.1.x-Rev652071.diff
          2 kB
          Donald Woods

        Activity

          People

            cdoremus Craig Doremus
            nikd Nikita Dubrovsky
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: