Closed
Bug 559566
Opened 15 years ago
Closed 15 years ago
Code evaluation in Error Console no longer works on Thunderbird
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: chado_moz, Unassigned)
References
Details
(Keywords: regression)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100415 (Firefox/3.7dev) Minefield/3.7a5pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100415 Minefield/3.7a5pre ID:20100415051417
Trying to evaluate code in Error Console returns
Error: uncaught exception, instead of expected result.
On Thunderbird, it's been seeing always.
On Firefox and SeaMonkey, it's been seeing with NoScript extesion,
when "about:blank" is removed from its Options - Whitelist.
I'm seeing this on WinXP SP3 and Linux (Ubunts-9.10-ja on VirtualBox Guest VM.)
Reproducible: Always
Steps to Reproduce:
1. Open Error Console from the Tools menu or in other way.
2. Type "new Date", "navigator.userAgent" (no need double quotations,)
or just 'XP' (need single quotations) into the Code box.
3. Then, enter or click [Evaluate.]
Actual Results:
No result, but it shows:
Error: uncaught exception: [Exception... "" nsresult: "0x805e0006 (<unknown>)"
location: "JS frame :: chrome://global/content/console.js :: loadOrDisplayResult :: line 85" data: no]
Expected Results:
Date strings, UA strings, or simple text "XP" should be returnd.
not reproduced:
rv:1.9.3a1pre) Gecko/20100201 Shredder/3.2a1pre ID:20100201035335
rv:1.9.3a1pre) Gecko/20100201 Minefield/3.7a1pre ID:20100201043011
reproduced:
rv:1.9.3a1pre) Gecko/20100202 Shredder/3.2a1pre ID:20100202032040
rv:1.9.3a1pre) Gecko/20100202 Minefield/3.7a1pre ID:20100202053418
and later builds including:
rv:1.9.3a5pre) Gecko/20100414 Minefield/3.7a5pre ID:20100414050851
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2010-02-01+03&enddate=2010-02-02+03
I have no idea, but can find the string "about:blank" in the comment of changeset
http://hg.mozilla.org/mozilla-central/rev/1de016190974
any relation with Bug 533381 ?
Keywords: regression
Version: unspecified → Trunk
Comment 1•15 years ago
|
||
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/console/content/console.js#118
The Error Console's Evaluate function works by running JS in an about:blank page; so it makes sense that blocking JavaScript (via NoScript) in about:blank breaks it.
Other than builds around 20100201, did it work in, say, Firefox 3.6 with NoScript blocking about:blank?
Or do you really mean that currently the Error Console's Evaluate doesn't work without NoScript installed? That works for me.
Summary: Code evaluation in Error Console returns Error: uncaught exception, instead of result → Code evaluation in Error Console returns Error: uncaught exception, instead of result with NoScript blocking about:blank
> Other than builds around 20100201, did it work in, say, Firefox 3.6
> with NoScript blocking about:blank?
Builds stand on 192-branch are not affected, so far.
> Or do you really mean that currently the Error Console's Evaluate
> doesn't work without NoScript installed? That works for me.
That works also for me.
Since comment#1, I found that I don't have to worry about Firefox and
SeaMonkey. So, I'm modifying summary.
Summary: Code evaluation in Error Console returns Error: uncaught exception, instead of result with NoScript blocking about:blank → Code evaluation in Error Console no longer works on Thunderbird
Comment 3•15 years ago
|
||
So a while ago bug 328932 changed the console to load a chrome:// document in the iframe for evaluations, then bug 238898 undid that change.
Now Thunderbird is unable to run javascript: URLs in such iframe, here's a simplified testcase (works in Firefox trunk):
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="text/javascript">
<![CDATA[
function run() {
document.getElementById("a").contentDocument.location = "javascript:alert(1)";
}
]]>
</script>
<iframe id="a" src="about:blank"/>
<button oncommand="run()"/>
</window>
I don't know how Thunderbird disables JS in content (it may end up blocking about:blank, similar to NoScript in Firefox).
In addition to Henri's changes, which are suspicious, though look benign, there's also http://hg.mozilla.org/mozilla-central/rev/a2f468118868 which touches code that may affect console's behavior.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Bug 533381 shouldn't have changed anything for about:blank-related code that has worked with the old HTML parser before. Bug 533381 was about *not* changing how about:blank is parsed (by special-casing it to use the old parser even when the new parser is enabled).
Comment 5•15 years ago
|
||
I doubt that bug 500328 caused this problem, but anything is possible, I suppose.
I'm getting an error when I try to build TB, but I'll see if someone on IRC can help me fix it tomorrow. If so, I should be able to test whether bug 500328 caused the problem.
Comment 7•15 years ago
|
||
FWIW
evaluation box works fine in current TB3.1 and 3.2 when using the extension
"console 2"
This is still existing.
Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100911 Thunderbird/3.2a1pre ID:20100911032434
has been failed on:
rv:2.0b9pre) Gecko/20101215 Thunderbird/3.3a2pre ID:20101215030055 2acce7110433
now works on:
rv:2.0b9pre) Gecko/20101216 Thunderbird/3.3a2pre ID:20101216030010 52207f8b382e
and later builds, including:
rv:2.0b9pre) Gecko/20110101 Thunderbird/3.3a2pre ID:20110101030015
it looks fixed through:
http://hg.mozilla.org/comm-central/pushloghtml?fromchange=2acce7110433&tochange=52207f8b382e ,
http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2010-12-15+03:00:00&enddate=2010-12-16+03:00:00 ,
or somewhere else.
making WFM.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•