WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228170
XHR.send(Document) should replace mismatched surrogates with replacement character before sending
https://bugs.webkit.org/show_bug.cgi?id=228170
Summary
XHR.send(Document) should replace mismatched surrogates with replacement char...
Alex Christensen
Reported
2021-07-21 16:44:53 PDT
XHR.send(Document) should replace mismatched surrogates with replacement character before sending
Attachments
Patch
(5.14 KB, patch)
2021-07-21 16:45 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(3.76 KB, patch)
2021-07-21 20:07 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(3.98 KB, patch)
2021-07-21 21:20 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(9.96 KB, patch)
2021-07-22 09:45 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2021-07-21 16:45:28 PDT
Created
attachment 433971
[details]
Patch
Chris Dumez
Comment 2
2021-07-21 17:03:52 PDT
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)?
Alex Christensen
Comment 3
2021-07-21 18:44:38 PDT
Aha! I knew it must exist already
Alex Christensen
Comment 4
2021-07-21 20:07:28 PDT
Created
attachment 433983
[details]
Patch
Alex Christensen
Comment 5
2021-07-21 21:20:16 PDT
Created
attachment 433987
[details]
Patch
Chris Dumez
Comment 6
2021-07-22 08:19:18 PDT
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.
Alex Christensen
Comment 7
2021-07-22 09:45:33 PDT
Created
attachment 434016
[details]
Patch
EWS
Comment 8
2021-07-22 10:44:41 PDT
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]
.
Radar WebKit Bug Importer
Comment 9
2021-07-22 10:45:15 PDT
<
rdar://problem/80970543
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug