Details
Description
We are getting following exception:
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)
In order to fix it, you should change code in decryptEntireUrl from:
for (; segNo < encryptedNumberOfSegments; segNo++) { if (segNo > originalNumberOfSegments) { break; }
to
for (; segNo < encryptedNumberOfSegments; segNo++) { if (segNo >= originalNumberOfSegments) // > was replaced with >= { break; }