Code

Fixed check hook execution
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Sep 2010 13:35:29 +0000 (13:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Sep 2010 13:35:29 +0000 (13:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19587 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/password/class_password.inc

index 84422ce039527cc816b155970d2bbd3f5f0d8eda..dd83519a1cdca99aecc6746097168aea157bc085 100644 (file)
@@ -111,8 +111,8 @@ class password extends plugin
 
             // Call the check hook
             $attrs = array();
-            $attrs['current_password'] = escapeshellarg($current_password);
-            $attrs['new_password'] = escapeshellarg($new_password);
+            $attrs['current_password'] = ($current_password);
+            $attrs['new_password'] = ($new_password);
 
             // Perform GOsa password policy checks 
             if(empty($current_password)){
@@ -206,10 +206,8 @@ class password extends plugin
                 if($returnCode !== 0){
                     @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execution failed code: ".$returnCode);
                     @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Result: ".$err);
-                    if($displayErrors){
-                        $message= msgPool::cmdexecfailed($cmd,$command, get_class($plugin));
-                        msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
-                    }
+                    $message= msgPool::cmdexecfailed($err,$command, "password");
+                    msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
                 }else{
                     @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Result: ".$arr);
                     return(preg_split("/\n/", $arr,0,PREG_SPLIT_NO_EMPTY));