RESOLVED FIXED63083
Web Inspector: wrong JSON.stringify used in webInspector.inspectedWindow.eval() backend
https://bugs.webkit.org/show_bug.cgi?id=63083
Summary Web Inspector: wrong JSON.stringify used in webInspector.inspectedWindow.eval...
mhillyard
Reported 2011-06-21 11:43:00 PDT
The devtools backend JSON.stringifys the result of an eval on the inspected page, i.e. when performing webInspector.inspectedWindow.eval(). The JSON.stringify that is executed is not properly sandboxed and may be an implementation provided by the inspected page. cnn.com provides a non-standard implementation, so webInspector.inspectedWindow.eval() can fail silently when inspecting cnn.com. The attached Chrome extension demonstrates this problem.
Attachments
Chrome extension that demonstrates bug. (2.05 KB, application/octet-stream)
2011-06-21 11:45 PDT, mhillyard
no flags
Patch (7.72 KB, patch)
2011-11-10 08:34 PST, Andrey Kosyakov
pfeldman: review+
mhillyard
Comment 1 2011-06-21 11:45:58 PDT
Created attachment 98028 [details] Chrome extension that demonstrates bug.
Pavel Feldman
Comment 2 2011-06-21 12:32:41 PDT
@caseq: you might need to introduce evaluateAsJson to the InjectedScript in order to mitigate this.
Libo Song
Comment 3 2011-11-01 12:53:59 PDT
More people are complaining Page Speed on this issue.
Andrey Kosyakov
Comment 4 2011-11-10 08:34:13 PST
Andrey Kosyakov
Comment 5 2011-11-10 08:49:58 PST
Note You need to log in before you can comment on or make changes to this bug.