Skip to content

Commit a172ef5

Browse files
akshay-joshidpage
authored andcommitted
Ensure the password isn't masked in connection strings.
1 parent 5d87a7b commit a172ef5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

connection.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,9 @@ const std::string CONNinfo::Parse(
478478
if (opt->dispchar[0] == 'D')
479479
continue;
480480

481-
if (!forLogging)
482-
val = opt->dispchar[0] == '*' ? "*****" : opt->val;
483-
else
481+
val = opt->val;
482+
if (forLogging)
484483
{
485-
val = opt->val;
486-
487484
LogMessage((
488485
boost::format("%s: %s") % opt->keyword %
489486
(opt->dispchar[0] == '*' ? "*****" : val)).str(), LOG_DEBUG

0 commit comments

Comments
 (0)