6.0.0-RC7
6/27/26

[#507] [PATCH] Configurable domain stripping
Summary [PATCH] Configurable domain stripping
Queue Passwd
Queue Version 2.2.1
Type Enhancement
State Rejected
Priority 2. Medium
Owners eric.rostetter (at) physics (dot) utexas (dot) edu
Requester ben (at) alkaloid (dot) net
Created 8/25/04 (7976 days ago)
Due
Updated 2/20/05 (7797 days ago)
Assigned 9/27/04 (7943 days ago)
Resolved 2/20/05 (7797 days ago)
Milestone
Patch No

History
359 Jan Schneider Comment #2
State ⇒ Rejected
Reply to this comment
This is what the user name hooks are for.
299 Jan Schneider Assigned to Eric Rostetter
State ⇒ Assigned
 
93 ben (at) alkaloid (dot) net Comment #1
State ⇒ New
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ [PATCH] Configurable domain stripping
Queue ⇒ Passwd
Reply to this comment
In my environment the entire username + domain is required to 
manipulate authentication tokens.  Therefore, I have added a conf.php 
option to passwd to allow the administrator to choose whether or not 
to strip the domain from the username.  The default is to replicate 
the functionality before the patch.  Trivial diff included.

---------- snip patch below -------------

diff -urN passwd-2.2.1/main.php passwd/main.php

--- passwd-2.2.1/main.php       2004-03-26 17:43:28.000000000 -0500

+++ passwd/main.php     2004-08-24 23:05:19.000000000 -0400

@@ -224,8 +224,12 @@

                                       Auth::getAuth());

          }

      } else {

-        $splitted  = split("@", Auth::getAuth());

-        $userid = @$splitted[0];

+        if($conf['prefs']['strip_domain']) {

+               $splitted  = split("@", Auth::getAuth());

+               $userid = @$splitted[0];

+       } else {

+               $userid = Auth::getAuth();

+       }

      }

  }



diff -urN passwd-2.2.1/config/conf.php.dist passwd/config/conf.php.dist

--- passwd-2.2.1/config/conf.php.dist   2003-01-20 20:28:29.000000000 -0500

+++ passwd/config/conf.php.dist 2004-08-24 23:06:42.000000000 -0400

@@ -25,6 +25,10 @@



  $conf['backend']['backend_list'] = 'hidden';



+// Determine whether or not to strip of the domain portion of the user's

+// authentication token.  By default we do.

+$conf['prefs']['strip_domain'] = 1;

+

  // Define usernames for which we will refuse to change passwords.

  // This may or may not work with realms or virtual hosting, 
depending on setup




Saved Queries