portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdore...@apache.org
Subject svn commit: r590627 - in /portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto: core/PortletContainerImpl.java internal/impl/BaseURLImpl.java
Date Wed, 31 Oct 2007 11:39:13 GMT
Author: cdoremus
Date: Wed Oct 31 04:39:13 2007
New Revision: 590627

URL: http://svn.apache.org/viewvc?rev=590627&view=rev
Log:
Added catch of PortletSecurityException to fix calls to PortletURLProvider.setSecure().

Modified:
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
    portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java?rev=590627&r1=590626&r2=590627&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/core/PortletContainerImpl.java
Wed Oct 31 04:39:13 2007
@@ -23,6 +23,7 @@
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletException;
 import javax.portlet.PortletRequest;
+import javax.portlet.PortletSecurityException;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
 import javax.servlet.ServletContext;
@@ -495,7 +496,12 @@
 
 		// Set secure of the redirect URL if necessary.
 		if (request.isSecure()) {
-			redirectURL.setSecure();
+			try {
+				redirectURL.setSecure();
+			} catch (PortletSecurityException e) {
+				LOG.error("Problem calling PortletURLProvider.setSecure()", e);
+				throw new IllegalStateException("Security cannot be set on the redirect URL (" + e.toString()
+ ").");
+			}
 		}
 	}
 

Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java?rev=590627&r1=590626&r2=590627&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java
(original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-container/src/main/java/org/apache/pluto/internal/impl/BaseURLImpl.java
Wed Oct 31 04:39:13 2007
@@ -33,6 +33,8 @@
 import javax.portlet.ResourceURL;
 import javax.portlet.WindowState;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.pluto.PortletContainer;
 import org.apache.pluto.descriptors.portlet.PortletDD;
 import org.apache.pluto.descriptors.portlet.SupportsDD;
@@ -50,6 +52,7 @@
  */
 public class BaseURLImpl implements BaseURL {
 
+	private static final Log LOG = LogFactory.getLog(BaseURLImpl.class);
 	private static final StringManager EXCEPTIONS = StringManager.getManager(PortletURLImpl.class.getPackage().getName());
 	protected Map parameters = new HashMap();
 	protected Map<String, String[]> publicRenderParameters = new HashMap<String, String[]>();
@@ -203,7 +206,12 @@
         portletURLFilterListener.callListener(internalPortletWindow,this,isAction,isResourceServing);
 	    
 	    if (secure) {
-	        urlProvider.setSecure();
+	        try {
+				urlProvider.setSecure();
+			} catch (PortletSecurityException e) {
+				LOG.error("Problem calling PortletURLProvider.setSecure()", e);
+				throw new IllegalStateException("Security cannot be set on this URL (" + e.toString()
+ ").");
+			}
 	    }
 	    if (!isResourceServing)
 	    	urlProvider.clearParameters();



Mime
View raw message