Commits

Dominik Ruf committed ac6acf1

remove possible port from targetspn

Comments (0)

Files changed (1)

hgssoauthentication.py

         
         if('Negotiate' in supported_schemes):
             try:
-                ca = ClientAuth("Kerberos", targetspn='HTTP/%s@%s' % (req.host, os.environ['USERDNSDOMAIN']), auth_info=None)
+                ca = ClientAuth("Kerberos", targetspn='HTTP/%s@%s' % (req.host.split(':')[0], os.environ['USERDNSDOMAIN']), auth_info=None)
                 out_buf = ca.authorize(None)[1]
                 data = out_buf[0].Buffer
                 auth = encodestring(data).replace("\012", "")