Closed Bug 392949 Opened 18 years ago Closed 18 years ago

new XMLHttpRequest().open.toString() shows the actual code of the function

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: manixrock, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Displays the source of the function, which should be protected. Reproducible: Always Steps to Reproduce: 1. Create a new html file. 2. write the following code: <SCRIPT> document.write("XMLHttpRequest.open: "+new XMLHttpRequest().open); </SCRIPT> 3. Run the script. Actual Results: function (method, url, async, username, password) { if (typeof async == "undefined") { async = false; } httpOpenWrapper(this, context, win, method, url, async, username, password); } Expected Results: function open() { [native code] }
I get: "XMLHttpRequest.open: function open() { [native code] }" Sounds like you have an extension installed, which overrides XMLHttpRequest unsafely. Can you try reproducing with a new profile in a trunk ("Minefield") build? http://www.mozilla.org/support/firefox/profile
Whiteboard: CLOSEME 10/06
thanks for pointing that out, Nickolay_Ponomarev. I've checked all my add-ons (I've got quite a few) and found the guilty one to be Firebug. They seem to replace the function so that they can display the connections in the firebug panel. They should have set "XMLHttpRequest.open.toString=function(){return 'function open {\n [native code]\n}'};" for better integration (for example someone might check to see if a function is a native function). So this "bug" is has been "squashed".
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Thanks for confirming my thoughts and closing the bug! Much appreciated.
Whiteboard: CLOSEME 10/06
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.