Issue #2402 - Fill in column in CSP Report.

This commit is contained in:
Brian Smith 2024-01-08 21:14:05 -06:00 committed by roytam1
commit b842a1937a

View file

@ -1041,6 +1041,11 @@ nsCSPContext::SendReports(
report.mCsp_report.mLine_number.Value() = aViolationEventInit.mLineNumber;
}
if (aViolationEventInit.mColumnNumber != 0) {
report.mCsp_report.mColumn_number.Construct();
report.mCsp_report.mColumn_number.Value() = aViolationEventInit.mColumnNumber;
}
nsString csp_report;
if (!report.ToJSON(csp_report)) {
return NS_ERROR_FAILURE;