History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-252
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Jean-Charles Meyrignac
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

IE6 Windows authentication doesn't work because proxy.pac returns undefined

Created: 16/May/07 11:16 AM   Updated: 12/Aug/08 05:35 PM
Component/s: Launcher - Internet Explorer
Affects Version/s: 0.9.0, 0.9.2
Fix Version/s: None

Environment: Windows 2003 Server + IE 6 (problem may exist on other configurations)


 Description  « Hide
[DGF This bug used to describe two problems; the second of the two problems has been moved out to SRC-365.]

Symptoms of the problem are problems during authentication with localhost sites requiring an identity (I can reproduce the bug easily, but it's hard to describe the configuration).

By default, proxy.pac will contain:

function FindProxyForURL(url, host) {
if(shExpMatch(url, '/selenium-server/')) { return 'PROXY localhost:4444;DIRECT'; }
}

This doesn't work in the case of basic authentication, because this function returns undefined when the URL doesn't match /selenium-server/. This leads to a problem of authentication for IE6 !!!
Instead, it should return null or 'DIRECT' (tested and both work, but undefined doesn't, neither '').



 All   Comments   Change History      Sort Order:
Dan Fabulich - 04/Jul/07 02:29 AM
I bet we need to fix this, but without a test, we'll have no way if we're doing more harm than good. How can we test this?

Jean-Charles Meyrignac - 04/Jul/07 02:43 AM
Here is how I reproduced it:

1) I setup a site asking for a login/password in its Windows domain (WORKGROUP should not work). It may be possible to simply check the Windows Authentication in the IIS properties.
2) IE is automatically able to connect if the login/password of the current user is in this domain, but Firefox will ask for a password.

The bug appears when using SeleniumRC on this site with IE: it won't be able to connect, and you'll get an authentication error.

But if you change the buggy line, SeleniumRC will be able to run.


Jean-Charles Meyrignac - 04/Jul/07 04:44 AM
Okay, here is how to setup the site with IIS (I'm using Vista, but XP or 2003 should be easier).

Create a website from any folder.
Remove all authentications (anonymous, basic , except Windows Authentication) and check Windows Authentication
Don't forget to allow browsing on this folder.

Check this site with IE, it should connect without asking a login/password.
Check with Firefox, it should ask for a login/password (simply use your current account).

Now, try to run SeleniumRC on this site.
You'll get an authentication error, if I'm not mistaken.


Dan Fabulich - 11/Sep/07 01:48 AM
Clearly the "first" bug (else clause with no if statement) isn't appropriate. Weirdly, it does appear to work OK.

As for the "second" bug, I'm a little more nervous about that. I don't really remember why, but I intentionally returned undefined in that case in revision 1193: http://svn.openqa.org/fisheye/changelog/selenium-rc?cs=1193

"If no proxy was specified, do not add an 'else' clause... this shouldn't be necessary, but seems to fix a bug in IE6's PAC handling"

I'd pushed off dealing with this bug in more detail because I didn't have time to investigate it in more detail; I'll make an effort to do so before 0.9.2 ships.


Philippe Sabourin - 11/Sep/07 12:37 PM
What is the planned timeline for this bug fix (and for 0.9.2)?

Nelson Sproul - 11/Sep/07 01:41 PM
There is no schedule per se for any of the bugs or the release, but there is an ongoing effort to resolve all the gating problems and get release out the door. I think everyone agrees that getting the release out is very important, so the focus is on testing and solving problems (as opposed to adding functionality, etc.).

Jean-Charles Meyrignac - 11/Sep/07 01:51 PM
If I have time, I may able to provide a Nant script to reproduce this bug.

Dan Fabulich - 11/Sep/07 01:54 PM
FYI, it's a lot easier for me to test basic authentication than it is for me to test Windows Authentication. Do you see this problem with Basic Authentication as well as Windows Authentication, or only on Windows Authentication?

Jean-Charles Meyrignac - 11/Sep/07 02:00 PM
Frankly, I don't know.

At my job, we are using a website administrator that requires Windows authentication, and that's how I can test it easily.
I have not checked with basic authentication, but it should have a similar problem, as long as the code passes through the undefined of the proxy.pac javascript routine.


Philippe Sabourin - 11/Oct/07 03:54 PM
"Fixed our long broken Firefox 2 browser launcher" was one of the points of the 0.9.2 release, yet I'm still seeing the corrupted proxy file mentioned above and therefore firefox can't be launched without using a *custom and a custom, working profile. Is this correct?

Jean-Charles Meyrignac - 11/Oct/07 04:40 PM
The corrupted proxy file happens with Internet Explorer.
I encountered the problem on XP, with a site asking for an authentication.

Dan Fabulich - 11/Oct/07 04:50 PM
The "long broken FF2 browser launcher" was totally busted in 0.9.0; FF2 would refuse to start altogether, no matter WHAT your proxy settings were. That was bug SRC-216, fixed in version 0.9.2.

This bug, however, is still open in 0.9.2. Part of the reason for that was because I'd thought that the "malformed" PAC file still seemed to work OK; indeed it does in IE, but doesn't work correctly in FF. The basic auth problem is separate, though, and I'm not so sure about it.

I'm going to break this "bug" up into two bugs and fix one of them (hanging else clause); the other one will have to wait until I can get a reproducible case; I can't seem to make it break on my machine, and we made a conscious decision not to return undefined for non-selenium URLs in revision 1193. If we can find a reproducible case (ideally one with basic authentication instead of Windows authentication?) I'll fix the "other" bug also.


Dan Fabulich - 11/Oct/07 05:04 PM
Re-filed part of this bug as SRC-365 (which is now fixed). Leaving this bug open until I can reproduce it and show that fixing it doesn't make anything worse.