New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 903893 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

NEL: Don't generate reports about insecure requests

Project Member Reported by dcreager@chromium.org, Nov 9

Issue description

The NEL spec requires that we only generate reports about requests to "Potentially Trustworthy" origins:

https://w3c.github.io/network-error-logging/#generate-a-network-error-report

Right now we're generating reports about *all* requests, even insecure HTTP ones.  We're correctly ignoring any policies unless they come in via HTTPS; but if you receive a policy via HTTPS and then make an HTTP request to the same origin, we'll currently create a report about it.  We might want to consider allowing that in the spec, but until then, we should make sure our implementation matches what the spec requires.
 
Cc: chlily@chromium.org mmenke@chromium.org
Owner: ----
Status: Available (was: Assigned)
Owner: chlily@chromium.org
Status: Assigned (was: Available)
Cc: dcreager@chromium.org
It looks like we create the report but it gets discarded and doesn't get queued: https://cs.chromium.org/chromium/src/net/network_error_logging/network_error_logging_service.cc?l=213

Am I missing something? Is it a problem that we create the report, even if it doesn't end up getting sent?
[chlily]:  Looks to me like you're right.

[dcreager]:  Is there any more action that needs to be taken here?
I guess it would also make sense to move the check up a step and discard it in HttpNetworkTransaction::GenerateNetworkErrorLoggingReport() to avoid generating a report that we're not going to send anyway.
I agree that it seems inelegant to create a report that we will immediately drop, but if you drop the report in HttpNetworkTransaction the histogram count won’t get updated.  Not sure how to square that.  I’d be happy with either approach, as long as it’s well documented in NetworkErrorLoggingService what the expectations are.

Re other actions: add a test case in http_network_transaction_unittest that makes an HTTPS request to install a NEL policy, and then an HTTP request to verify that no report is generated (and that the histogram count is updated).
Project Member

Comment 8 by bugdroid1@chromium.org, Dec 4

Status: Fixed (was: Assigned)

Sign in to add a comment