]> git.mxchange.org Git - mailer.git/commitdiff
Secure sensetive data
authorRoland Häder <roland@mxchange.org>
Tue, 26 Feb 2013 22:28:33 +0000 (22:28 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 26 Feb 2013 22:28:33 +0000 (22:28 +0000)
inc/db/lib-mysql3.php

index e20b271d441016ce53c29f553404890a75f197cb..29c5541a7756ea6b608022a844cc8285e2283792 100644 (file)
@@ -355,6 +355,24 @@ function SQL_ERROR ($file, $line, $message) {
        // Remember plain error in last_sql_error
        $GLOBALS['last_sql_error'] = mysql_error();
 
+       // Is login set?
+       if (isset($GLOBALS['mysql']['login'])) {
+               // Secure login name in message
+               $message = str_replace($GLOBALS['mysql']['login'], '***', $message);
+       } // END - if
+
+       // Is database password set?
+       if (isset($GLOBALS['mysql']['password'])) {
+               // Secure password in message
+               $message = str_replace($GLOBALS['mysql']['password'], '***', $message);
+       } // END - if
+
+       // Is database name set?
+       if (isset($GLOBALS['mysql']['dbase'])) {
+               // Secure database name in message
+               $message = str_replace($GLOBALS['mysql']['dbase'], '***', $message);
+       } // END - if
+
        // Is there installation phase?
        if (isInstallationPhase()) {
                /*