[EMAIL PROTECTED] wrote:
Author: dpage

Date: 2006-02-17 11:05:34 +0000 (Fri, 17 Feb 2006)

New Revision: 5003

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=5003&view=rev

Log:
Mask the password when logging the connection string.


This crashes for debug builds.  Need to use .c_str() on the cleanConnStr.

Kris Jurka
Index: src/base/pgConnBase.cpp
===================================================================
*** src/base/pgConnBase.cpp     (revision 5006)
--- src/base/pgConnBase.cpp     (working copy)
***************
*** 170,176 ****
      // Open the connection
      wxString cleanConnStr = connstr;
      cleanConnStr.Replace(qtConnString(password), wxT("'XXXXXX'"));
!     wxLogInfo(wxT("Opening connection with connection string: %s"), 
cleanConnStr);
  
  #if wxUSE_UNICODE
      wxCharBuffer cstrUTF=connstr.mb_str(wxConvUTF8);
--- 170,176 ----
      // Open the connection
      wxString cleanConnStr = connstr;
      cleanConnStr.Replace(qtConnString(password), wxT("'XXXXXX'"));
!     wxLogInfo(wxT("Opening connection with connection string: %s"), 
cleanConnStr.c_str());
  
  #if wxUSE_UNICODE
      wxCharBuffer cstrUTF=connstr.mb_str(wxConvUTF8);
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to