Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 6.1.9
-
Component/s: Security and SSL
-
Labels:None
-
Environment:Windows XP, java version "1.5.0_12",
-
Number of attachments :
Description
when starting jetty with one socketconnector, and adding a securityhandler with digest authentication, jetty incorrectly sends the challenge to clients.
the challenge sent is
WWW-Authenticate: Digest realm="SPE-Provisioning", domain="null", nonce="LK7vNhoBAADScmkDWPhaRt6HJF3mmCOl", algorithm=MD5, qop="auth"
the domain should contain the uri sent by the client, not null
in file org.mortbay.jetty.security.DigestAuthenticator.java, line 149
public void sendChallenge(UserRealm realm,
Request request,
Response response,
boolean stale)
throws IOException
request.getContextPath() returns null, replacing it with request.getPathInfo() solves the problem
I think the domain should be the context path rather than the full URI.
So the bug is that for the root context, getContextPath returns null. I have committed a patch that now handles the root context and
sets the domain to "/"