This issue was alluded to in comment 5 on http://drupal.org/node/22981 and may be related to problems encountered in nodes 284515 and 239101. However, I did not see an elaboration on how the problem manifests itself to the user.

On a freshly installed Drupal on IIS where the drupal admin user name was set to the same value as the IIS authenticated user (assume username is drupal-admin), enabling webserver_auth create a new unprivileged account (DOMAIN\drupal-admin). The session will no longer have admin rights and attempting to log in from new browser windows will authenticated as the new unprivileged user. At this point, it appears impossible to restore admin rights without doing directly into the database and I was not able to find a reliable repair.

The situation can be preempted by changing the username in the database prior to enabling webserver_auth, however \ is not an acceptable character in the username forms, so the name must be changed directly in the database.

mysql>update users set name = "DOMAIN\\drupal-admin" where uid=1;

If that is done just before enabling webserver_auth, the session will still have admin rights after enabling webserver_auth. Whenever that user is seen, the user name will be displayed as DOMAIN\drupal-admin, however new accounts will not have the domain name.

The issue appears to be that the the call to user_external_login_register in webserver_auth_init starts with a user name with the domain name by eventually in its calling stack encounters webserver_auth_user where the username would have been cleaned up. Processing the user name before calling user_external_login_register appears to avoid the issue.

CommentFileSizeAuthor
#1 webserver_auth-667476.patch2.39 KBCurt Arnold
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Curt Arnold’s picture

FileSize
2.39 KB
verta’s picture

subscribing - is there documentation on how to apply a patch like this somewhere?

boilermaker.jb1’s picture

You will need to use the patch command. Which is documented below assuming you are running on a *nix machine.

http://linux.die.net/man/1/patch

verta’s picture

Thanks for the link. We are running on Windows - I'll wait until there is a dev release, then I can help test it.

verta’s picture

Can someone confirm this patch? Would really like to try a dev version with this fix. Would it be possible to post a patched copy of webserver_auth.module to this thread?

kenorb’s picture

Status: Active » Closed (outdated)

Closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.