w3c / w3c/webdriver

accept insecure TLS state seems badly specified

Open
#1,848 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Navigate To
Dominant language
HTML
Stars
718
Forks
228
PR merge metrics
No merged PRs in 30d

Description

https://w3c.github.io/webdriver/#dfn-post-navigation-checks contains:

response is blocked by content security policy

If the remote end's accept insecure TLS state is true, take implementation specific steps to ensure the navigation is not aborted and that the untrusted or invalid TLS certificate error that would normally occur under these circumstances, are suppressed.

Otherwise return error with error code insecure certificate.

This seems to originate from https://github.com/w3c/webdriver/commit/321fff4e12d80a745828f7c711fdc18932cca244 (from https://github.com/w3c/webdriver/pull/337).

As far as I can tell, what we're actually trying to override is the nebulous "if establishing a connection does not succeed (e.g., a UDP, TCP, or TLS error), then return failure" in https://fetch.spec.whatwg.org/#create-a-connection which ultimately gets surfaced as a network error. Fetch calls into the CSP to determine whether or not certain requests should be blocked, but TLS connection errors aren't one of them.

This should presumably be under "response is a network error" instead.

However, this doesn't make sense to have as a post-navigation step.

If Fetch is failing with a network error while it is creating a connection, it is not even reaching a point of actually making an HTTP request. Thus while navigation will complete, it will have already hit the network error when creating the connection. It is unclear how after the navigation (assuming it hasn't timed out) the implementation can "take implementation specific steps to ensure the navigation is not aborted and that the untrusted or invalid TLS certificate error that would normally occur under these circumstances, are suppressed".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the post-navigation checks section and the cited Fetch create-a-connection algorithm, then review commit 321fff4 and pull request 337. Determine where accept insecure TLS behavior belongs and define the expected navigation outcome; the specification should state this behavior unambiguously.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, networking, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.