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 |
State ⇒ Rejected
State ⇒ Assigned
State ⇒ New
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ [PATCH] Configurable domain stripping
Queue ⇒ Passwd
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