When the auth type is NTLM or Negotiate, webserver_auth module removes any domain name specification from the username. However, when using kerberos authentication, the username takes the form user@DOMAIN

- the relevent piece of code effectively removes the first character of the username (bug)
- whatever is after and including the @ sign is better removed (nice to have)
- trim is called twice for $account->name, and better do it only once (nice to have)

The attached patch:

- tests for the substring "\" before removing the NT domain
- tests for an @ sign and removes the domain if exists
- does the trimming only once

Please apply.

Comments

anuradha-1’s picture

This report seems to be about the same bug.

moshe weitzman’s picture

Status: Needs review » Fixed

applied. sorry it took so long. i did not test, since i no longer have access to windows.

Anonymous’s picture

Status: Fixed » Closed (fixed)