Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349917

Summary: SWT browser failed to be closed with zoon elevation enabled
Product: [Eclipse Project] Platform Reporter: wuzhe <wuzhe>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, grant_gayed, kleind, wuzhe
Version: 3.6.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Patch
none
Patch v2 none

Description wuzhe CLA 2011-06-21 05:39:46 EDT
Build Identifier: SWT 3.6.2

If we enable zoon elevation for SWT browser, "COM.CoInternetSetFeatureEnabled(/*SecuritySettings.FEATURE_ZONE_ELEVATION*/1, COM.SET_FEATURE_ON_PROCESS, true);" and set "about:blank" as a Trusted site in IE standalone and set Trusted site's security level to high, then we will get "access deny" error inside OleAutomation.invoke() when we try to call IE.close() to close the browser. Here I use Snippet326 as the sample and just modify on line:
from "browser.setText(HTML);" to "browser.setText(HTML, false);"
to let setText() follow internet zoon.

I will attach a proposed fix for review. We need to get the errorCode of Idispatch.invoke to tell whether it's an access deny that we should just close the browser or it's an user's cancel action that we should keep the browser.

Reproducible: Always
Comment 1 wuzhe CLA 2011-06-21 05:41:53 EDT
Created attachment 198313 [details]
Patch

Patch
Comment 2 wuzhe CLA 2011-06-21 05:57:09 EDT
Created attachment 198315 [details]
Patch v2

Patch v2
Comment 3 wuzhe CLA 2011-06-23 03:15:53 EDT
Also, there is another scenario that browser can not be closed which is more common:
1)we enable zoon elevation for SWT browser.
2)Do not set "about:blank" to any zoon in IE.
3)Only set IE's internet zoon's security level to high.
4)Change snippet from "browser.setText(HTML);" to "browser.setText(HTML, false);".

The problem also can be reproduced.
Comment 4 Lars Vogel CLA 2019-11-14 03:13:51 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.