Tags with unpaired utf16 surrogates break |
||||||||||
Issue descriptionThe spec has background sync tags as DOMStrings. This means they're allowed to have unpaired surrogates. This can be problematic when transitioning between utf16 and utf8 (which the browser typically uses). We use String::utf8() to convert from utf16 to utf8 to send to the browser, which is lenient and keeps the unpaired surrogates. It turns out that the reverse, converting String::fromUtf8 is not lenient, and will return a null string if the string contains unpaired surrogates. So either we need to make a lenient String::fromUtf8 or we need to store as string16 on the browser side.
,
Apr 12 2016
,
Apr 12 2017
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue. The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 3 2017
I'm not sure this is necessary any more since https://codereview.chromium.org/2629573002 - kinuko@ can you confirm?
,
Aug 30 2017
kinuko@ can you confirm Anita's comment?
,
Sep 6 2017
jkarlin@ - do you know if this is still an issue? / how do we confirm?
,
Sep 6 2017
I honestly don't remember at this point, but I think jsbell was working on it?
,
Sep 6 2017
I don't remember us getting the "convert invalid utf16 to invalid utf8" changes all the way through review and landed, so I believe this is still open. (Searching bugs/commits for wtf8 / wtf16 or "utf8 lenient" may be helpful.)
,
Sep 7 2017
Thanks both. Sounds like it's likely still an issue so marking as Available and whoever picks it up can confirm. jkarlin/jsbell@: while I have your ear, could either of you explain what problems this issue could cause to help with prioritization? (bugs? crashes? undefined behaviour? I'm trying to triage this as bug cop without really knowing anything about background sync or utf conversions..)
,
Sep 7 2017
Ah, sorry jsbell, I assumed this was the relevant cachestorage issue not a background sync issue. The issue: If script registers a background sync and passes a name that has unpaired surrogates in it, then the name won't be passed back to the sync function when it runs in the service worker, instead it'll get an empty string. This is because the utf8->utf16 conversion (from browser process to render process) won't allow it. For this to happen the script would essentially have to use a binary value for the string. Not high priority, but something that should eventually be fixed.
,
Sep 8 2017
Got it, thanks!
,
Sep 10
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 10
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by jkarlin@chromium.org
, Mar 7 2016