6.0.0-beta1
7/24/25

[#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 08/25/2004 (7638 days ago)
Due
Updated 02/20/2005 (7459 days ago)
Assigned 09/27/2004 (7605 days ago)
Resolved 02/20/2005 (7459 days ago)
Milestone
Patch No

History
02/20/2005 09:28:35 PM Jan Schneider Comment #2
State ⇒ Rejected
Reply to this comment
This is what the user name hooks are for.
09/27/2004 09:14:29 AM Jan Schneider Assigned to Eric Rostetter
State ⇒ Assigned
 
08/25/2004 03:44:09 AM 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