From 8257b00483c41418c70f51b0458305218ff34678 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 15 Aug 2007 07:05:04 +0000 Subject: [PATCH] Removed duplicated hash detection git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7061 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_password-methods.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/class_password-methods.inc b/include/class_password-methods.inc index 6ea694f20..97546decf 100644 --- a/include/class_password-methods.inc +++ b/include/class_password-methods.inc @@ -113,16 +113,16 @@ function change_password ($dn, $password, $mode=0, $hash= "") $deactivated = FALSE; } - // Get current password hash method if available - if($hash == "" && isset($attrs['userPassword'][0]) && preg_match("/[\{\}]/",$attrs['userPassword'][0])){ - $hash = preg_replace("/^[^\{]*+\{([^\}]*).*$/","\\1",$attrs['userPassword'][0]); - $hash = strtolower($hash); - } - - // Set encryption type to clear if required - if (!isset($attrs['userPassword'][0]) || $hash == ""){ - $hash= "clear"; - } +# // Get current password hash method if available +# if($hash == "" && isset($attrs['userPassword'][0]) && preg_match("/[\{\}]/",$attrs['userPassword'][0])){ +# $hash = preg_replace("/^[^\{]*+\{([^\}]*).*$/","\\1",$attrs['userPassword'][0]); +# $hash = strtolower($hash); +# } + +# // Set encryption type to clear if required +# if (!isset($attrs['userPassword'][0]) || $hash == ""){ +# $hash= "clear"; +# } // Detect the encryption Method if ( (isset($attrs['userPassword'][0]) && preg_match ("/^{([^}]+)}(.+)/", $attrs['userPassword'][0], $matches)) || $hash != ""){ -- 2.30.2