You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/03/29 16:20:25 UTC

[jira] [Commented] (WICKET-6131) IndexOutOfBoundsException in org.apache.wicket.core.request.mapper.CryptoMapper.decryptEntireUrl

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

ASF subversion and git services commented on WICKET-6131:
---------------------------------------------------------

Commit c0fb5d4b2f64160a64186fbd0dcdafcab6e83384 in wicket's branch refs/heads/wicket-6.x from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=c0fb5d4 ]

WICKET-6131 IndexOutOfBoundsException in org.apache.wicket.core.request.mapper.CryptoMapper.decryptEntireUrl


> IndexOutOfBoundsException in org.apache.wicket.core.request.mapper.CryptoMapper.decryptEntireUrl
> ------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-6131
>                 URL: https://issues.apache.org/jira/browse/WICKET-6131
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.20.0
>         Environment: Ubuntu Server
>            Reporter: Maciej Miklas
>            Assignee: Martin Grigorov
>             Fix For: 7.3.0, 8.0.0-M1, 6.23.0
>
>
> We are getting following exception: 
> {code}
> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
> 	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
> 	at java.util.ArrayList.get(ArrayList.java:429)
> 	at org.apache.wicket.core.request.mapper.CryptoMapper.decryptEntireUrl(CryptoMapper.java:537)
> 	at org.apache.wicket.core.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:387)
> 	at org.apache.wicket.core.request.mapper.CryptoMapper.getCompatibilityScore(CryptoMapper.java:189)
> 	at org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:138)
> 	at org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:190)
> 	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:215)
> 	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> 	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> 	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> 	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
> {code}
> In order to fix it, you should change code in decryptEntireUrl from:
> {code:java}
> 		for (; segNo < encryptedNumberOfSegments; segNo++)
> 		{
> 			if (segNo > originalNumberOfSegments)
> 			{
> 				break;
> 			}
> {code}
> to
> {code:java}
> 		for (; segNo < encryptedNumberOfSegments; segNo++)
> 		{
> 			if (segNo >= originalNumberOfSegments) // > was replaced with >=
> 			{
> 				break;
> 			}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)