Skip to content

Commit

Permalink
Prevent credentials being logged in plain text (#249)
Browse files Browse the repository at this point in the history
* Prevent credentials being logged in plain text
except in the highest debug level

* Fix missing semicolon
  • Loading branch information
Daniel B authored and msimerson committed Apr 20, 2016
1 parent 044fff9 commit 260bd6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Qpsmtpd/TcpServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ sub read_input {
while (<STDIN>) {
alarm 0;
$_ =~ s/\r?\n$//s; # advanced chomp
$self->log(LOGINFO, "dispatching $_");
my $log = $_;
$log =~ s/AUTH PLAIN (.*)/AUTH PLAIN <hidden credentials>/
unless ($self->config('loglevel') || '6') >= 7;
$self->log(LOGINFO, "dispatching $log");
$self->connection->notes('original_string', $_);
defined $self->dispatch(split / +/, $_, 2)
or $self->respond(502, "command unrecognized: '$_'");
Expand Down

0 comments on commit 260bd6c

Please sign in to comment.