Closed Bug 1020407 Opened 10 years ago Closed 10 years ago

CSP in C++: Should log different console message if parsing of source fails

Categories

(Core :: DOM: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

Attachments

(1 file)

Currently we use policyURIParseError when parsing a source fails - we should make sure we are printing the best possible (most accurate) error message to the console for all the different parsing errors.
Blocks: 925004
Assignee: nobody → mozilla
Attached patch bug_1020407.patch (deleted) — Splinter Review
As discussed in person we should log more descriptive console messages if parsing fails for some cases. In particular, the use of 'policyURIParseError' is not the right message to use. I updated those cases and also think that mCurToken should be used instead of mCurValue, because mCurToken is the token that is currently being processed (e.g. http://test.com:88a) whereas in such a case mCurValue would be "" once we encountere the error after :88. I updated all the cases and the parser and verified that we log the most descriptive error message for developers to the console.
Attachment #8434296 - Flags: review?(sstamm)
Comment on attachment 8434296 [details] [diff] [review] bug_1020407.patch Review of attachment 8434296 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Good call on replacing mCurValue with mCurToken.
Attachment #8434296 - Flags: review?(sstamm) → review+
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla32
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: