[geeklog-cvs] Geeklog-1.x/public_html/admin database.php, 1.49, 1.49.2.1

Dirk Haun dhaun at qs1489.pair.com
Tue Jul 15 04:32:07 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin
In directory qs1489.pair.com:/tmp/cvs-serv24240

Modified Files:
      Tag: geeklog_1_5_0_1
	database.php 
Log Message:
Hide the database password when the database backup failed and we're logging the mysqldump command (ported over from the Trunk)


Index: database.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/database.php,v
retrieving revision 1.49
retrieving revision 1.49.2.1
diff -C2 -d -r1.49 -r1.49.2.1
*** database.php	7 Jun 2008 12:41:44 -0000	1.49
--- database.php	15 Jul 2008 08:32:03 -0000	1.49.2.1
***************
*** 184,187 ****
--- 184,192 ----
          $command .= " $_DB_name > \"$backupfile\"";
  
+         $log_command = $command;
+         if (!empty($_DB_pass)) {
+             $log_command = str_replace(" -p$_DB_pass", ' -p*****', $command);
+         }
+ 
          if (function_exists('is_executable')) {
              $canExec = is_executable($_DB_mysqldump_path);
***************
*** 197,201 ****
                  $retval .= COM_showMessage(94);
                  COM_errorLog('Backup Filesize was less than 1kb', 1);
!                 COM_errorLog("Command used for mysqldump: $command", 1);
              }
          } else {
--- 202,206 ----
                  $retval .= COM_showMessage(94);
                  COM_errorLog('Backup Filesize was less than 1kb', 1);
!                 COM_errorLog("Command used for mysqldump: $log_command", 1);
              }
          } else {
***************
*** 206,210 ****
                                                           'footer'));
              COM_errorLog('Backup Error: Bad path or mysqldump does not exist', 1);
!             COM_errorLog("Command used for mysqldump: $command", 1);
          }
      } else {
--- 211,215 ----
                                                           'footer'));
              COM_errorLog('Backup Error: Bad path or mysqldump does not exist', 1);
!             COM_errorLog("Command used for mysqldump: $log_command", 1);
          }
      } else {




More information about the geeklog-cvs mailing list