Bug 1105521 - FastURLDecoder cannot decode surrogate pair characters
Summary: FastURLDecoder cannot decode surrogate pair characters
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER09
: 6.2.0
Assignee: Lucas Ponce
QA Contact: Tomas Kyjovsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-06 10:17 UTC by Takayuki Konishi
Modified: 2025-02-10 03:36 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:36:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
a patch for testcase. (954 bytes, patch)
2014-06-06 10:18 UTC, Takayuki Konishi
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GTNCOMMON-24 0 Major Open FastURLDecoder cannot decode surrogate pair characters 2016-08-12 12:41:00 UTC
Red Hat Issue Tracker GTNPORTAL-3579 0 Major Resolved Add validation for surrogate pair of characters on UITabbedDashboard 2016-08-12 12:41:01 UTC

Description Takayuki Konishi 2014-06-06 10:17:39 UTC
Description of problem:

FastURLDecoder cannot decode surrogate pair characters.
When I decoded U+20000B, I got NullPointerException:

java.lang.NullPointerException
	at org.gatein.common.text.FastURLDecoder$LookupNonTerm.access$1(FastURLDecoder.java:269)
	at org.gatein.common.text.FastURLDecoder.safeEncode(FastURLDecoder.java:215)
	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:45)
	at org.gatein.common.text.AbstractCharEncoder.encode(AbstractCharEncoder.java:62)
	at org.gatein.common.text.FastURLDecoderTestCase.testEncodeSurrogatePair(FastURLDecoderTestCase.java:259)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

I also attach a patch for testcase.

Comment 3 Lucas Ponce 2015-02-27 13:05:54 UTC
Added patch on 3.8.x upstream branch:

https://github.com/gatein/gatein-portal/pull/933

FastURLDecoder/FastURLEncoder can not be patched easily without putting in risk other layers related encoded issues.

Comment 4 Peter Palaga 2015-02-27 22:03:00 UTC
The workaround in https://github.com/gatein/gatein-portal/pull/933 was merged in upstream (3.8.x branch only).

Comment 5 Tomas Kyjovsky 2015-03-17 12:08:22 UTC
According to Lucas, the customer was satisfied with the workaround.

I tested it with dashboard on 6.2.0.ER9 and it seems to work as expected.

Comment 6 Red Hat Bugzilla 2025-02-10 03:36:01 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.