Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349917 - SWT browser failed to be closed with zoon elevation enabled
Summary: SWT browser failed to be closed with zoon elevation enabled
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 05:39 EDT by wuzhe CLA
Modified: 2019-11-14 03:13 EST (History)
4 users (show)

See Also:


Attachments
Patch (2.61 KB, text/plain)
2011-06-21 05:41 EDT, wuzhe CLA
no flags Details
Patch v2 (2.75 KB, text/plain)
2011-06-21 05:57 EDT, wuzhe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.