fix: webidl.brandcheck non strict should throw - #2683
Merged
Conversation
Uzlopak
force-pushed
the
fix-webidl-brandcheck
branch
from
February 1, 2024 08:36
0b8d8e3 to
678f0f4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2683 +/- ##
==========================================
- Coverage 85.54% 85.29% -0.26%
==========================================
Files 76 84 +8
Lines 6858 7582 +724
==========================================
+ Hits 5867 6467 +600
- Misses 991 1115 +124 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
KhafraDev
approved these changes
Feb 1, 2024
Member
|
A test would be nice. |
Contributor
Author
|
@mcollina |
KhafraDev
reviewed
Feb 3, 2024
Contributor
Author
|
added for the other three cookie functions tests. |
Contributor
Author
|
What do you think about having an additional brandCheckLax webidl method for performance reasons? |
Member
|
👎 |
Contributor
Author
|
Ok, but this PR is fine so far, right? I guess we could merge it then after the security release? |
Member
|
yep, waiting on the security release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is very strange, that in case of strict: false brandCheck would not throw, but in strict cases it would throw.
We use the non strict brandCheck e.g.
undici/lib/cookies/index.js
Line 56 in 0808a72
The non strict check is basically a no op, as nothing happens with the result. I assume this was just an oversight.
I would actually recommend for performance reasons to implement a webidl.brandCheckLax (or something like that) and make webidl.brandCheck only handle strict cases.
This relates to...
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status