rest of patch for bug 317334 - hang when long wrappable string is passed to prompt() [e.g. as used in the exploit for IE's <body onload=window()> bug], r=mconnor
git-svn-id: svn://10.0.0.236/trunk@206052 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -124,16 +124,9 @@ function commonDialogOnLoad()
|
||||
}
|
||||
|
||||
// display the main text
|
||||
var messageText = gCommonDialogParam.GetString(0);
|
||||
var messageParent = document.getElementById("info.box");
|
||||
var messageParagraphs = messageText.split("\n");
|
||||
|
||||
for (var i = 0; i < messageParagraphs.length; i++) {
|
||||
var descriptionNode = document.createElement("description");
|
||||
var text = document.createTextNode(messageParagraphs[i]);
|
||||
descriptionNode.appendChild(text);
|
||||
messageParent.appendChild(descriptionNode);
|
||||
}
|
||||
var messageParent = document.getElementById("info.box").getElementsByTagName('description')[0];
|
||||
// XXX the substr(0, 10000) part is a workaround for bug 317334
|
||||
messageParent.textContent = gCommonDialogParam.GetString(0).substr(0, 10000);
|
||||
|
||||
setElementText("info.header", gCommonDialogParam.GetString(3), true);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#endif
|
||||
<!-- text -->
|
||||
<description id="info.header" class="header"/>
|
||||
<vbox id="info.box">
|
||||
<vbox id="info.box" style="white-space: -moz-pre-wrap;">
|
||||
<description/>
|
||||
</vbox>
|
||||
|
||||
|
||||
@@ -1005,10 +1005,6 @@ dialogheader {
|
||||
-moz-binding: url("chrome://global/content/bindings/dialog.xml#dialogheader");
|
||||
}
|
||||
|
||||
dialog .info-box {
|
||||
white-space: -moz-pre-wrap;
|
||||
}
|
||||
|
||||
/********* page ************/
|
||||
|
||||
page {
|
||||
|
||||
Reference in New Issue
Block a user