Summary: | XHR.send(Document) should replace mismatched surrogates with replacement character before sending | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||||||
Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Alex Christensen
2021-07-21 16:44:53 PDT
Created attachment 433971 [details]
Patch
Comment on attachment 433971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433971&action=review > Source/WebCore/xml/XMLHttpRequest.cpp:467 > +static String convertIfNecessary(const String& input) Isn't this the same as stringToUSVString()? If so, can we reuse it (maybe renaming stringToUSVString to replaceUnpairedSurrogatesWithReplacementCharacter, as its associated FIXME comment says)? Aha! I knew it must exist already Created attachment 433983 [details]
Patch
Created attachment 433987 [details]
Patch
Comment on attachment 433987 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=433987&action=review > Source/WebCore/xml/XMLHttpRequest.cpp:487 > + auto converted = stringToUSVString(WTFMove(serialized)); Would have been nice to rename stringToUSVString() to replaceUnpairedSurrogatesWithReplacementCharacter() since you are reusing it here for something that is not strictly a USVString conversion. Created attachment 434016 [details]
Patch
Committed r280181 (239875@main): <https://commits.webkit.org/239875@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434016 [details]. |