Throw "invalid cookie domain" as its definition implies#1955
Open
yezhizhen wants to merge 1 commit intow3c:masterfrom
Open
Throw "invalid cookie domain" as its definition implies#1955yezhizhen wants to merge 1 commit intow3c:masterfrom
yezhizhen wants to merge 1 commit intow3c:masterfrom
Conversation
Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
Member
Author
github-merge-queue bot
pushed a commit
to servo/servo
that referenced
this pull request
Mar 26, 2026
Improve the error reporting for [cookie addition](https://w3c.github.io/webdriver/#add-cookie). Most notably, when - expiry time exceeds maximum safe integer - cookie domain is not equal to session's current browsing context's active document's domain There is a bug with spec: #43690 (comment). We fix spec in w3c/webdriver#1955 and make sure Servo behaves consistently with other browsers. Testing: Added one test for invalid expiry time. New passing with existing. --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Contributor
|
This makes sense. Thanks for discovering that discrepancy. The referenced tests can be found here but I have to add that we only test unsupported schemes for |
Member
Author
|
Adding one more in web-platform-tests/wpt#58801 |
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.
See servo/servo#43690 (comment)
The definition of InvalidCookieDomain is: An illegal attempt was made to set a cookie under a different domain than the current page.
But somehow, the spec asks to throw "invalid argument" error for this case.
However, all browsers indeed throw "invalid cookie domain" for this case.
Following test aligns with current spec, yet fails for all browsers.
This change is
Preview | Diff