struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4187) ServletRedirectResult only works with a limited set of hardcoded URL protocols
Date Fri, 21 Mar 2014 20:15:54 GMT

    [ https://issues.apache.org/jira/browse/WW-4187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943488#comment-13943488
] 

ASF subversion and git services commented on WW-4187:
-----------------------------------------------------

Commit ae12bd76551baab3ab9e3df7655fe579e526c5d7 in struts's branch refs/heads/feature/use-js-to-support-multiple-buttons
from [~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=ae12bd7 ]

WW-4187 finshes work: protocols are identified based on URL class


> ServletRedirectResult only works with a limited set of hardcoded URL protocols
> ------------------------------------------------------------------------------
>
>                 Key: WW-4187
>                 URL: https://issues.apache.org/jira/browse/WW-4187
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.7, 2.3.8, 2.3.12, 2.3.14, 2.3.14.1, 2.3.14.2, 2.3.14.3, 2.3.15.1
>            Reporter: Michiel Toneman
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.17
>
>
> The isPathUrl(String url) implementation was changed from:
> {code:java}
> return (url.indexOf(':') == -1);
> {code}
> to:
> {code:java}
> return !url.startsWith("http:")
>                 && !url.startsWith("https:")
>                 && !url.startsWith("mailto:")
>                 && !url.startsWith("file:")
>                 && !url.startsWith("ftp:");
> {code}
> This breaks integrations which require a redirect in (e.g.) a mobile app for iOS which
often use custom protocols such as myapp:// 
> There are also numerous valid / common protocols which are not in this list.
> The result of this change is that redirects to such URLs are treated as local redirects
(paths), rather than absolute redirects.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message