Bug 255479 - Combine Base64DecodeOptions and Base64DecodeMode
Summary: Combine Base64DecodeOptions and Base64DecodeMode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anne van Kesteren
URL:
Keywords: InRadar
Depends on: 255840
Blocks: 255467
  Show dependency treegraph
 
Reported: 2023-04-15 00:25 PDT by Anne van Kesteren
Modified: 2023-04-24 00:00 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 2023-04-15 00:25:56 PDT
Based on analyzing the code and knowledge of the web platform I want to see if we can trim these down to three modes:

* Default, which uses the normal map, validates padding, and is strict on whitespace.
* DefaultIgnoreWhitespace, like Default, but ignores ASCII whitespace. It notably does not ignore U+000B. WebKit used to ignore U+000B in some cases, but that was more an historical accident of using isASCIISpace where isHTMLSpace was warranted. See also bug 255467.
* URL, which uses the URL map, does not validate padding, but is strict on whitespace. It's common for the URL case to not validate padding as including = in URLs can sometimes be involved. Also none of the existing WebKit code would validate padding or be loose on whitespace.

I plan to put up a draft PR to see if there is any bot fallout.
Comment 1 Radar WebKit Bug Importer 2023-04-15 00:26:05 PDT
<rdar://problem/108082420>
Comment 2 Anne van Kesteren 2023-04-15 00:38:05 PDT
Pull request: https://github.com/WebKit/WebKit/pull/12768
Comment 3 EWS 2023-04-24 00:00:00 PDT
Committed 263298@main (252a605f3492): <https://commits.webkit.org/263298@main>

Reviewed commits have been landed. Closing PR #12768 and removing active labels.