-
-
Notifications
You must be signed in to change notification settings - Fork 689
fix: webidl.brandcheck non strict should throw #2683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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:
|
|
A test would be nice. |
|
@mcollina |
|
added for the other three cookie functions tests. |
|
What do you think about having an additional brandCheckLax webidl method for performance reasons? |
|
👎 |
|
Ok, but this PR is fine so far, right? I guess we could merge it then after the security release? |
|
yep, waiting on the security release |
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