You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "David DeWolf (JIRA)" <ji...@apache.org> on 2006/02/08 23:49:32 UTC

[jira] Resolved: (PLUTO-203) IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

     [ http://issues.apache.org/jira/browse/PLUTO-203?page=all ]
     
David DeWolf resolved PLUTO-203:
--------------------------------

    Resolution: Won't Fix
     Assign To: David DeWolf

Per the specification and javadocs, the method should:

Throws:
 java.lang.IllegalArgumentException - if path doesn't have a leading slash or is not an absolute URL

What's the actually error in jetspeed?  Is there another way to validate an abolute url that's more accurate or is jetspeed non compliant?  This patch should not  be applied unless it's updated to meet the spec.

> IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)
> --------------------------------------------------------------------------------------------
>
>          Key: PLUTO-203
>          URL: http://issues.apache.org/jira/browse/PLUTO-203
>      Project: Pluto
>         Type: Bug
>   Components: portlet container
>     Versions: 1.0.1
>  Environment: J2SE 1.4 on Linux
>     Reporter: Shinsuke SUGAYA
>     Assignee: David DeWolf
>     Priority: Critical
>  Attachments: PortletResponseImpl.patch
>
> For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet environment:
> <h:outputLink value="mailto:test@test.com">...
> and also you will encounter IllegalArgumentException when using values other than ...://... and /...
> I think that the simple solution is:
> $ svn diff ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
> ===================================================================
> --- pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java   (revision 372353)
> +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java   (working copy)
> @@ -98,8 +98,7 @@
>      public String encodeURL(String path) {
>          if (path.indexOf("://") == -1 && !path.startsWith("/")) {
> -            throw new IllegalArgumentException(
> -                "only absolute URLs or full path URIs are allowed");
> +            return path;
>          }
>          PortletContainerServices services = getContainer()

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira