Closed Bug 899946 Opened 11 years ago Closed 11 years ago

strange call to crypto.generateCRMFRequest from test_bug882865.html

Categories

(Core :: Security, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

Attachments

(1 file, 1 obsolete file)

(The test case is from Bug 882865, but I don't have permission to access Bug 882865) In http://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/tests/mochitest/bugs/test_bug882865.html?force=1#28 The call to generateCRMFRequest is 25 var o200 = document.documentElement; 26 var o1 = crypto; 27 try { 28 o1.generateCRMFRequest(o200.writeln, o200, 'X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X', null, o1, 1404343237, Math.PI, []); But the 1st parameter o200.writeln is undefined (Or maybe it should be document.writeln?), so the test should fail with 1st argument reqDN is missing.
The current generateCRMFRequest code checks argv[0] for null, but not for undefined. So in the current code, the above will invoke JS_ValueToString() on undefined, producing "undefined". I suspect that just changing the test to pass in "undefined" there will not affect what it's testing, for what it's worth.
Blocks: 883741
bz is correct.
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → allstars.chh
Attachment #783718 - Flags: review?(Ms2ger)
Attached patch PatchSplinter Review
replace it with double quotes.
Attachment #783718 - Attachment is obsolete: true
Attachment #783718 - Flags: review?(Ms2ger)
Attachment #783720 - Flags: review?(Ms2ger)
Attachment #783720 - Flags: review?(Ms2ger) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: