Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 235661 - Manual proxy configuration cannot persist proxy authentication
Summary: Manual proxy configuration cannot persist proxy authentication
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.4 RC4   Edit
Assignee: Szymon Brandys CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 236078 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-04 14:02 EDT by Ed Willink CLA
Modified: 2008-12-10 04:44 EST (History)
6 users (show)

See Also:
tomasz.zarna: review+
martinae: review+
Michael.Valenta: review+


Attachments
Proposed fix v01 (1.01 KB, patch)
2008-06-05 11:39 EDT, Szymon Brandys CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2008-06-04 14:02:21 EDT
RC3

I am unable to establish a CVS pserver connection to 206.191.52.48 port 80
from behind a firewall.

Investigation with Ethereal/Wireshark reveals that the local proxy
is being bypassed, despite its configuration.

This may be because the enable proxy authentication and gated
username and passwords are broken for at least a manual internet
proxy configuration. They can be entered and applied,
but reactivating the preferences shows that they were not persisted.

Reproducible in a clean from ZIP Win32 installation of just Eclipse.

Window->Preferences.General.Network Connections.

Select manual proxy.

Configure enabled proxy, user, password

Apply, Ok

Window->Preferences.General.Network Connections.

config is lost.

----
org.eclipse.core.net.prefs shows

#Wed Jun 04 15:04:02 BST 2008
proxyData/HTTP/hasAuth=false
proxyData/HTTP/host=proxy
org.eclipse.core.net.hasMigrated=true
eclipse.preferences.version=1
proxiesEnabled=true
proxyData/HTTP/port=80
nonProxiedHosts=127.0.0.1|localhost

no sign of the user (or password).
Comment 1 Szymon Brandys CLA 2008-06-05 08:14:49 EDT
Seems to be related to introducing the secure storage in this area.
Comment 2 Oleg Besedin CLA 2008-06-05 10:37:44 EDT
The problem was created by the bug 226459, not by the secure storage.

Note those lines in the patch for that bug:
-		if (!proxiesEnabled) {
+		if (proxiesEnabled && !systemProxiesEnabled) {

in the file org.eclipse.ui.internal.net.ProxyPreferencePage method initializeValues.
Comment 3 Szymon Brandys CLA 2008-06-05 10:42:22 EDT
Thanks Oleg for quick response. I'm looking at it now.
Comment 4 Szymon Brandys CLA 2008-06-05 11:39:20 EDT
Created attachment 103762 [details]
Proposed fix v01
Comment 5 Martin Aeschlimann CLA 2008-06-05 11:52:47 EDT
+1 for 3.4 RC4
Comment 6 Tomasz Zarna CLA 2008-06-05 12:19:57 EDT
Looks fine to me too, +1. 
Comment 7 Oleg Besedin CLA 2008-06-05 12:21:32 EDT
Hmm I don't know the code. The user/password should be enabled only when
"manual proxy configuration" is selected?

If that's correct, should not the condition of clearing user/password be

!(manual) 
  = !(proxiesEnabled && !systemProxiesEnabled) 
    = !proxiesEnabled || systemProxiesEnabled

It seems to be the same condition as the proposed in the patch:
   (!proxiesEnabled || (proxiesEnabled && systemProxiesEnabled))  
but just a tiny bit simpler.

Comment 8 Tomasz Zarna CLA 2008-06-05 12:42:25 EDT
(In reply to comment #7)
> Hmm I don't know the code. The user/password should be enabled only when
> "manual proxy configuration" is selected?
> 
> If that's correct, should not the condition of clearing user/password be
> 
> !(manual) 
>   = !(proxiesEnabled && !systemProxiesEnabled) 
>     = !proxiesEnabled || systemProxiesEnabled
> 
> It seems to be the same condition as the proposed in the patch:
>    (!proxiesEnabled || (proxiesEnabled && systemProxiesEnabled))  
> but just a tiny bit simpler.

You're right Oleg, but afaik there is "manual" flag in the code, and the others are taken from proxyService object. Is that right Szymon?

Comment 9 Szymon Brandys CLA 2008-06-05 13:06:51 EDT
(In reply to comment #7)
> You're right Oleg, but afaik there is "manual" flag in the code, and the others
> are taken from proxyService object. Is that right Szymon?

Right, manual = proxiesEnabled && !systemProxiesEnabled which are taken from ProxyService object. Looking at this code now, I see it needs some refactoring.
I wanted my changes related to OS support to be not too invasive...

Comment 10 Tomasz Zarna CLA 2008-06-05 13:53:50 EDT
Released to HEAD with "!proxiesEnabled || systemProxiesEnabled" condition.
Comment 11 Kim Horne CLA 2008-06-06 14:03:41 EDT
*** Bug 236078 has been marked as a duplicate of this bug. ***