Conversation
|
Thanks for the patch. Could you check the Travis CI test failure above please? |
|
Yes, I'll see if I can fix that, thanks for pointing it out. |
|
I think I see what the problem is. Now that we set |
|
@dcoutts, do we support both auth types or only digest auth? On Thu, Mar 20, 2014 at 2:07 PM, Erik Hesselink notifications@github.xm233.cnwrote:
|
|
We only offer digest auth (however if clients pre-emptively send basic auth then we do accept it). So a properly functioning client that gets prompted for authentication will only be offered digest and should only respond with digest auth. |
|
Perhaps we can make the code do this conditionally for safari. Using no qop should be ok according to the standard (iirc), it's the older digest standard, but the newer one the introduces qop (I think) still says it's ok to leave it out and behave the same as the older standard. |
|
Actually, if the HTTP package just ignores the qop then we should be ok. The server can use
|
|
Oh, right, but that's what the TODO was about, that the HTTP package has a totally broken qop=auth impl. It sends qop=auth but does not include the required cnonce etc. We could make the server more forgiving, by treating Filed as haskell/HTTP#54 |
We now offer 'qop="auth"', because without it, authentication in Safari fails immediately. With the field set to auth, authentication seems to work in the latest Firefox, Safari, Chrome and Internet Explorer. However, the HTTP package as used in cabal-install has a bug where it send 'qop="auth"' without an 'nc' or 'cnonce' field. So we are lenient: when these fields are not present, we fall back to no qop. Fixes haskell#132. [1] haskell/HTTP#54
|
I've amended the fix to fall back to QopNone when the 'nc' or 'cnonce' fields are missing. This fixes the test case (at least locally; let's wait for Travis). |
|
Thanks! |
|
Thanks for fixing this! 👍 |
@dcoutts: I'm not sure what the TODO meant, perhaps you remember?
An empty qop field makes authentication in Safari fail immediately. With the field set to auth, authentication seems to work in the latest Firefox, Safari, Chrome and Internet Explorer. This is with HTTP 4000.2.10.
Fixes #132, which we're getting asked about a lot on admin@hackage.haskell.org.