Bug 43854 - Web Inspector: remove openInInspectorWindow and evaluateAndStringify from InjectedScript.
: Web Inspector: remove openInInspectorWindow and evaluateAndStringify from Inj...
Status: RESOLVED FIXED
: WebKit
Web Inspector (Deprecated)
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2010-08-11 08:41 PST by
Modified: 2010-08-13 05:08 PST (History)


Attachments
[PATCH] Proposed change. (9.71 KB, patch)
2010-08-11 08:42 PST, Pavel Feldman
yurys: review-
Review Patch | Details | Formatted Diff | Diff
[PATCH] Proposed change (9.57 KB, patch)
2010-08-13 04:56 PST, Pavel Feldman
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-08-11 08:41:31 PST
Patch to follow.
------- Comment #1 From 2010-08-11 08:42:42 PST -------
Created an attachment (id=64118) [details]
[PATCH] Proposed change.
------- Comment #2 From 2010-08-11 08:47:14 PST -------
Attachment 64118 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/inspector/InspectorController.cpp:50:  Alphabetical sorting problem.  [build/include_order] [4]
WebCore/inspector/InspectorController.cpp:1930:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
------- Comment #3 From 2010-08-11 23:22:50 PST -------
(From update of attachment 64118 [details])
WebCore/inspector/InspectorController.cpp:1884
 +      newFrame->loader()->setOpener(mainFrame);
We may want to break this link for security reasons(to avoid possibility for the inspected page to open an arbitrary URL by means of the web inspector and have an access to it).

WebCore/inspector/InspectorController.cpp:1925
 +  InjectedScript InspectorController::injectedScriptForId(long id)
It's not used anywhere, please remove.

WebCore/inspector/front-end/InjectedScriptAccess.js: 
 +  InjectedScriptAccess._installHandler("evaluateAndStringify");
Please fix the callers.
------- Comment #4 From 2010-08-13 04:55:56 PST -------
(In reply to comment #3)
> (From update of attachment 64118 [details] [details])
> WebCore/inspector/InspectorController.cpp:1884
>  +      newFrame->loader()->setOpener(mainFrame);
> We may want to break this link for security reasons(to avoid possibility for the inspected page to open an arbitrary URL by means of the web inspector and have an access to it).
> 

It is not worse than it used to be + I don't think it is exploitable.

> WebCore/inspector/InspectorController.cpp:1925
>  +  InjectedScript InspectorController::injectedScriptForId(long id)
> It's not used anywhere, please remove.
> 

Done.

> WebCore/inspector/front-end/InjectedScriptAccess.js: 
>  +  InjectedScriptAccess._installHandler("evaluateAndStringify");
> Please fix the callers.


Done.
------- Comment #5 From 2010-08-13 04:56:43 PST -------
Created an attachment (id=64320) [details]
[PATCH] Proposed change
------- Comment #6 From 2010-08-13 05:08:46 PST -------
(From update of attachment 64320 [details])
Clearing flags on attachment: 64320

Committed r65314: <http://trac.webkit.org/changeset/65314>
------- Comment #7 From 2010-08-13 05:08:56 PST -------
All reviewed patches have been landed.  Closing bug.