Bug 213441 - User/Password is not restored in Network Connection preference page if http proxy is not used
Summary: User/Password is not restored in Network Connection preference page if http p...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-12-19 07:05 EST by Daniel Friederich CLA
Modified: 2008-02-07 10:14 EST (History)
0 users

See Also:


Attachments
Daniel's fix as a patch (1.27 KB, patch)
2008-01-03 11:24 EST, Tomasz Zarna CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Friederich CLA 2007-12-19 07:05:47 EST
Build ID: I20071213-1700

Steps To Reproduce:
1. Open the Network Connections
2. Clear the HTTP Proxy, enter "socks.whatever.com" and a port as SOCKS proxy
3. Enable "Enable proxy authentication"
4. Enter as Username "User" and "Password" as password :-)
5. Click Apply & OK
6. Reopen the preference page
7. Expected: "Enable proxy authentication" enabled
   BUG: is disabled
8. also user and password fields are empty


More information:
The bug is in ProxyPreferencePage, initializeValues function.
There this code snippet:
****************************************************************************
			IProxyData data = entryList[0].getProxy();
			this.enableProxyAuth.setSelection(data.isRequiresAuthentication());
****************************************************************************

It only checks the first's entry, the HTTP protocol.
As I was just trying to use eclipses cvs socks proxy support, I did not enter anything in there.

Here's the same snippet fixed (sorry, I know, it's not a patch, I don't have the cvs sources right now)


****************************************************************************
			// use the first entry which does need authentication
			IProxyData data = null;
			for (int i = 0; i < entryList.length; i++) {
				IProxyData idata = entryList[i].getProxy();
				if (idata.isRequiresAuthentication()) {
					data = idata;
					break;
				}
			}
			if (data == null) {
				// no entry needs authentication, just pick the first.
				data = entryList[0].getProxy();
			}
			this.enableProxyAuth.setSelection(data.isRequiresAuthentication());
****************************************************************************

Workarounds: enter a http proxy. Or reenter the user id and the password every time that pref is shown.
Comment 1 Tomasz Zarna CLA 2008-01-03 11:24:05 EST
Created attachment 86106 [details]
Daniel's fix as a patch
Comment 2 Tomasz Zarna CLA 2008-01-10 04:00:42 EST
Released to HEAD. Thanks Daniel!
Comment 3 Tomasz Zarna CLA 2008-02-07 10:14:11 EST
Verified in I20080205-0010.