|
@@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
+import java.net.InetAddress;
|
|
|
import java.security.PrivilegedActionException;
|
|
|
import java.security.PrivilegedExceptionAction;
|
|
|
import java.util.ArrayList;
|
|
@@ -342,7 +343,8 @@ public class KerberosAuthenticationHandler implements AuthenticationHandler {
|
|
|
authorization = authorization.substring(KerberosAuthenticator.NEGOTIATE.length()).trim();
|
|
|
final Base64 base64 = new Base64(0);
|
|
|
final byte[] clientToken = base64.decode(authorization);
|
|
|
- final String serverName = request.getServerName();
|
|
|
+ final String serverName = InetAddress.getByName(request.getServerName())
|
|
|
+ .getCanonicalHostName();
|
|
|
try {
|
|
|
token = Subject.doAs(serverSubject, new PrivilegedExceptionAction<AuthenticationToken>() {
|
|
|
|