Skip to content

Use EqualIgnoringAsciiCase() in LookupAlgorithmIdByName()#58271

Merged
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-7633022
Mar 5, 2026
Merged

Use EqualIgnoringAsciiCase() in LookupAlgorithmIdByName()#58271
chromium-wpt-export-bot merged 1 commit intomasterfrom
chromium-export-cl-7633022

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 4, 2026

The "Normalizing an algorithm" algorithm[1] says that names should be
matched ASCII case-insensitive [2]. Currently the lookup sort of does
that, but the verifying comparison still uses a full Unicode
case-folding comparison. Because of how the lookup is structured the
lookup for some algorithm names could still accept non-ASCII.

Replace the final DeprecatedEqualIgnoringCase() comparison with
EqualIgnoringAsciiCase().

[1] https://w3c.github.io/webcrypto/#algorithm-normalization-normalize-an-algorithm
[2] https://w3c.github.io/webcrypto/#case-insensitive

Bug: 40476285
Change-Id: If1ee6a3c1e75f271c171b44f8de31fe688546b0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7633022
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1594550}

The "Normalizing an algorithm" algorithm[1] says that names should be
matched ASCII case-insensitive [2]. Currently the lookup sort of does
that, but the verifying comparison still uses a full Unicode
case-folding comparison. Because of how the lookup is structured the
lookup for some algorithm names could still accept non-ASCII.

Replace the final DeprecatedEqualIgnoringCase() comparison with
EqualIgnoringAsciiCase().

[1] https://w3c.github.io/webcrypto/#algorithm-normalization-normalize-an-algorithm
[2] https://w3c.github.io/webcrypto/#case-insensitive

Bug: 40476285
Change-Id: If1ee6a3c1e75f271c171b44f8de31fe688546b0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7633022
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/main@{#1594550}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 9d18397 into master Mar 5, 2026
25 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-7633022 branch March 5, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants