Repository navigation
Conversation
|
As is, this will break the build. Could you please file a PR for https://github.com/gwtproject/tools to add the new version, then update the CI files here, similar to #10115 ? |
@zbynek Sure, I will. |
7e4fbcd to
d94ea62
Compare
|
Done! @zbynek |
|
Thanks. Also, after checking the available versions, the latest is 78.3. Is there any reason for picking 64.1? Note that GWT in general is not constrained to Java 8 anymore, any version compatible with Java 17 should be fine. |
|
@zbynek my strategy is to upgrade to the first version that is not affected by the CVE. |
|
@niloc132 any peference for the used version? |
|
I'm content with "not vulnerable", though I dont think we're vulnerable anyway? If you're including malicious source in your project anyway, it can already do anything. How is an int overflow a 9.8 anyway though? We can definitely do another bump later to something recent, not targeting to fix a vuln. |
CVE-2018-18928 is an integer overflow in DecimalQuantity::toScientificString() present in ICU 63.1 (both icu4c and icu4j). The fix was backported in the same commit to the Java port (DecimalQuantity_AbstractBCD.java) and first shipped in the 64.1 release. 74.2 is chosen as the target: it is the last version fully compatible with the existing UOption-based cldr-import tooling (UOption was removed in ICU 75). - dev/build.xml: update jar path from icu4j/63.1/ to icu4j/74.2/ - maven/poms/gwt/pom-template.xml: bump com.ibm.icu:icu4j version to 74.2 - .github/workflows: temporarily point to yesamer/tools@icu4j-64.1 branch (to be reverted to gwtproject/tools once the companion tools PR merges)
d94ea62 to
3bb2ed5
Compare
|
@zbynek @niloc132 Since 75.1, a breaking change impacts GenerateGwtCldrData: Based on this, I think upgrading to 74.2 is the best compromise for this scope. WDYT? |
|
Thank you for the fix @zbynek |
|
The failing tests seem relevant, though the error messages are misleading: 🧪 - gwt/user/test/com/google/gwt/i18n/I18N2Test.gwt.xml | expected: <in timezone: 2/1/2010, 7:04:05 PM>, actual: <in timezone: 2/1/2010, 7:04:05 PM> The expected string has an ASCII space, the returned string a \u202f. |
|
@zbynek The pattern is produced at GWT compile time by DateTimePatternGenerator.getBestPattern("hms"), which delegates to ICU's DateTimePatternGenerator. The result (h:mm:ss\u202fa) gets baked into generated code. At runtime, GWT's DateTimeFormat.parsePattern() only recognises plain ASCII space as whitespace, so \u202f passes through as a literal character and appears verbatim in the formatted output. I'm investigating possible solutions, feel free to suggest any, in case. |
I guess we have 3 options:
|
|
On the one hand, it makes good sense to force a nonbreaking space between the time and the AM/PM marker, but it is a change that might surprise some teams. I do like emulating old behavior, but I think it is also reasonable to default to new behavior? It is adding complexity though. Aside from something relatively heavy like a config property to control this, could we let this be customizable in some way? It looks like "no" at a quick glance, or at least not in our DateTimePatternGenerator wrapper type. @yesamer if you don't want to try to work out some of this, maybe try with 64.1 as you initially did, and see if that still breaks this test, then we can split off the two changes (UOption and this nbsp issue) for later followup? |
ICU 72.1 / CLDR 42 introduced U+202F (NARROW NO-BREAK SPACE) as the separator between time and AM/PM marker in English and other locales. GWT's DateTimeFormat pattern parser only recognises ASCII space (U+0020), causing the character to be emitted verbatim in formatted output and breaking I18N2Test (testStaticTimeZone, testDynamicTimeZone). ICU 71.1 is the last release without this change and still addresses CVE-2018-18928 (fixed since ICU 63).
|
@zbynek @niloc132, thank you for your guidance and suggestions. I had the same concerns about how to handle this. |
Upgrade com.ibm.icu:icu4j from 63.1 to 71.1 to fix CVE-2018-18928, an integer overflow in DecimalQuantity::toScientificString() present in ICU 63.1. The patch applies to both the C/C++ and Java ports and was first shipped in the 64.1 release.
Closes #9959
Tools repository PR: gwtproject/tools#43