Commit 9d18397
Use EqualIgnoringAsciiCase() in LookupAlgorithmIdByName()
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}1 parent 3db1450 commit 9d18397
1 file changed
+52
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments