Closed Bug 1732543 Opened 5 years ago Closed 4 years ago

Instant evaluation called on expression using Function.prototype.call.bind(Function.prototype.call) but shouldn't

Categories

(DevTools :: Console, defect, P2)

Firefox 92
defect

Tracking

(firefox105 verified)

VERIFIED FIXED
105 Branch
Tracking Status
firefox105 --- verified

People

(Reporter: alanas.00, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(2 external files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0

Steps to reproduce:

  1. press F12
  2. select console tab
  3. make sure "Instant Evaluation" is on
  4. copy+paste "Function.prototype.call.bind(Function.prototype.call)(document.write,document,'<h1>why did <code>document.write</code> execute?</h1>');" without pressing enter

https://www.reddit.com/r/firefox/comments/pvojtj/running_stuff_in_javascript_console_without/

Actual results:

document.write executed and page changed to "why did document.write execute?"

Expected results:

page not changed and document.write not executed because it has side effects (same as if you copy+paste "document.write('<h1>why did <code>document.write</code> execute?</h1>');" without pressing enter)

Status: UNCONFIRMED → NEW
Component: Untriaged → Console
Ever confirmed: true
Product: Firefox → DevTools
Summary: running stuff in javascript console without pressing enter → Instant evaluation called on expression using Function.prototype.call.bind(Function.prototype.call) but shouldn't

We should look at what's going on

Severity: -- → S3
Priority: -- → P2
See Also: → 1754141
See Also: → 1777241
See Also: → 1609432
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED

The severity field for this bug is relatively low, S3. However, the bug has 3 duplicates.
:arai, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(arai.unmht)

This is not security sensitive (the hidden one is also not security sensitive. it needs to be opened up by someone who has privilege).
While it's nice to fix, this is not major issue nor blocker, in my opinion.

Flags: needinfo?(arai.unmht)
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/dacb2580cb23 Part 1: Call onNativeCall for Function.prototype.{call,apply} inside self-hosted JS. r=jandem https://hg.mozilla.org/integration/autoland/rev/e5706a3cddeb Part 2: Add eager evaluation testcase. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
QA Whiteboard: [qa-105b-p2]

I was able to reproduce this issue on Firefox 104.0(build ID: 20220818191623) on Ubuntu 22.04 using the STR from the Description. Verified as fixed on Firefox 105.0b7(build ID: 20220904185841) and Nightly 106.0a1(build ID: 20220905214329) on Ubuntu 22.04, Windows 10, macOS 12.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-105b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: