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.
Extend
browser.createUserContext
withacceptInsecureCerts
parameter #895New 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
base: main
Are you sure you want to change the base?
Extend
browser.createUserContext
withacceptInsecureCerts
parameter #895Changes from all commits
b13e99a
045000b
9fbbcbb
dfd5e02
c390b56
ee9d7c7
687a825
b953bbd
e698fb6
8b2079a
d8f1480
249e40c
d5e5fe4
65d8eab
9032410
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to integrate this better with the WebDriver classic spec (which admittedly is a mess).
For example: what happens if the WebDriver session ends? If you end a classic session then the flag is unset, and cert checking resumes. But BiDi supports multiple sessions, and this is global state, so do we need to revert it only when the last session ends? Or when the session that set the flag ends (I guess the latter). Currently it seems like it would persist indefinitely. Also, in theory, the capability can be unsupported. It seems reasonable that we handle the unsupported case here too (e.g. by returning an error).
(A really good patch here would have a check in fetch at the point at which a request is started. That would allow answering questions like "what about service workers?". But I understand that's a lot of work, so I don't consider it a blocker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the behavior of
acceptInsecureCerts
andproxy
should be identical. As long as we cannot configure proxy AFTER the user context is created, I'd propose to keep theacceptInsecureCerts
andproxy
behavior even after the WebDriver BiDi session is closed.In order to prevent conflicts with Classic sessions, I'd propose to make the command params
acceptInsecureCerts
andproxy
mutually exclusive with the capability.This is intentional.
Good point. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done:
acceptInsecureCerts
is tight to the session created the user context. When the session is disconnected, the default behavior taken from WebDriverClassic is restored.acceptInsecureCerts
is not supported, error will be returned.Open question:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW: I believe the TLS check happens in fetch: create a connection, step 2, "... create a connection ...".