[ 
https://issues.apache.org/jira/browse/PLUTO-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Donald Woods updated PLUTO-484:
-------------------------------

    Fix Version/s: 1.1.6
                   2.0.0

> PortletURLImpl.setSecure() throws PortletSecurityException when 
> PortletURLProvider.isSecureSupported() returns true
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-484
>                 URL: https://issues.apache.org/jira/browse/PLUTO-484
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 1.1.5
>         Environment: Tomcat 5.5.26
>            Reporter: Nikita
>             Fix For: 2.0.0, 1.1.6
>
>         Attachments: P484-1.1.x-Rev652071.diff
>
>
> 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.");
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to