Closed Bug 1608911 Opened 4 years ago Closed 4 years ago

Reporting API should send a *collection* of reports to endpoint

Categories

(Core :: DOM: Security, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: arenevier, Assigned: arenevier)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file, 1 obsolete file)

When a feature violation is reported, a request is sent to the endpoint with the following json:

{
"age": 1002,
"type": "feature-policy-violation",
"url": "http://localhost/reporting.php",
"user_agent":+"Mozilla/5.0+(X11;+Linux+x86_64;+rv:74.0)+Gecko/20100101+Firefox/74.0",
"body": {
"featureId": "geolocation",
"sourceFile": "http://localhost/reporting.php",
"lineNumber": 8,
"columnNumber": 22,
"disposition":+"enforce"
}
}

But according to Reporting API specification, a collection of report should be sent. Which means that this report, even when submitted individually, should be enclosed within []

Assignee: nobody → arenevier

In order to respect the specification, we need to send the reports as a collection.

This gives us the opportunity to group reports by endpoints and principal. That
way, if we have multiple reports to send to the same endpoint, we can do it
with only one request.

In order to respect the specification, we need to send the reports as a collection.

This gives us the opportunity to group reports by endpoints and principal. That
way, if we have multiple reports to send to the same endpoint, we can do it
with only one request.

Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [domsecurity-active]
Attachment #9120672 - Attachment is obsolete: true
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a8cf21968b97
Send reports to endpoint as a collection. r=baku

The bug was due to a typo inside a MOZ_ASSERT()
(which is why I didn't catch it on my build).

I have pushed a new patch.

Flags: needinfo?(arenevier)
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31fb9b1aa4b1
Send reports to endpoint as a collection. r=baku
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: