Closed Bug 863874 Opened 11 years ago Closed 2 years ago

Log relevant security errors to the Web Console

Categories

(Core :: DOM: Security, defect)

defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: grobinson, Unassigned)

References

(Depends on 2 open bugs)

Details

This is a tracking bug for all open bugs requesting security error logging to the Web Console.

Thanks to 837351, we can now log security errors relevant to web developers to a dedicated pane in the Web Console (and simultaneously to the Error Console). We also now have a dedicated security.properties file to use for storing localizable message strings. New security features should use this functionality, and I will create additional bugs to fix any security features that do not currently log to the Web Console but should, or that log to the incorrect pane (previously it was common to overload the JS pane).
Assignee: nobody → grobinson
Status: NEW → ASSIGNED
Depends on: 837351, 713980, 821877, 846918
In order to have your errors appear in the web console, use the following checklist:

1. Your error messages should be localized strings. If you are reporting from Gecko code, I recommend storing the strings in dom/locales/en-US/chrome/security/security.properties. You can then use the eSECURITY_PROPERTIES enum value to reference it. If you use format string specifiers in your messages, make sure you leave comments explaining them for the localization team!
2. Report an nsIScriptError, either by creating the error object and reporting it to the nsIConsoleService manually, or by using the nsContentUtils::ReportToConsole helper function.
3. Define a category for your errors. We currently use specific strings like "CSP", "CORS", etc.
4. Modify categoryForScriptError() in browser/devtools/webconsole/webconsole.js code so it sorts nsIScriptErrors with this category into the appropriate group (JS, CSS, Security, etc.). Simply add a new case statement with the category of your new errors.
Depends on: 875456
Depends on: 762593
Depends on: 792161
Depends on: 898712
Depends on: 902691
Depends on: 892273
Depends on: 769525
Depends on: 1115151

The bug assignee didn't login in Bugzilla in the last 7 months.
:dveditz, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: garrett.f.robinson+mozilla → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(dveditz)

This may be pretty much done. Moving to DOM: Security for triage

Component: Security → DOM: Security
Flags: needinfo?(dveditz)

The bulk of these are fixed. The remaining ones should be done by the teams involved.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.