Commits

Dominik Ruf committed b921bb0

also remove port from kerberos init

  • Participants
  • Parent commits ac6acf1

Comments (0)

Files changed (1)

hgssoauthentication.py

     def http_error_401(self, req, fp, code, msg, headers):
         supported_schemes = [s.strip() for s in headers.get("WWW-Authenticate", "").split(",")]
 
-        context = kerberos.authGSSClientInit("HTTP@%s" % req.get_host())[1]
+        context = kerberos.authGSSClientInit("HTTP@%s" % req.get_host().split(':')[0])[1]
         kerberos.authGSSClientStep(context, supported_schemes[0])
         response = kerberos.authGSSClientResponse(context)
         req.add_unredirected_header('Authorization', "Negotiate %s" % response)