From ec40f5719982dc631fb775ba3f7137f5f46961ae Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 06 Mar 2012 07:28:03 -0500
Subject: [PATCH] Fixed mysql encryption function in remoting_lib.inc.php

---
 interface/lib/classes/remoting_lib.inc.php |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 3057554..f9b6e72 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -611,6 +611,10 @@
                                                 if($field['formtype'] == 'PASSWORD') {
 														if($field['encryption'] == 'CRYPT') {
                                                                 $record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
+                                                        } elseif ($field['encryption'] == 'MYSQL') {
+																$sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
+														} elseif ($field['encryption'] == 'CLEARTEXT') {
+																$sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
                                                         } else {
                                                                 $record[$key] = md5($record[$key]);
                                                         }

--
Gitblit v1.9.1