diff --git a/Changes b/Changes index a72b07f..f70bb30 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ 0.26-dev + Filter out all uncommon characters from the remote_host + setting. (thanks to Frank Denis / Jedi/Sector One for the hint). + + Added a check for the spool_dir having mode 0700. + Don't break under taint mode on OpenBSD. (thanks to Frank Denis / Jedi/Sector One) diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm index bf0f798..7b36e23 100644 --- a/lib/Qpsmtpd/TcpServer.pm +++ b/lib/Qpsmtpd/TcpServer.pm @@ -15,6 +15,11 @@ sub start_connection { my $remote_info = $ENV{TCPREMOTEINFO} ? "$ENV{TCPREMOTEINFO}\@$remote_host" : $remote_host; my $remote_ip = $ENV{TCPREMOTEIP}; + # if the local dns resolver doesn't filter it out we might get + # ansi escape characters that could make a ps axw do "funny" + # things. So to be safe, cut them out. + $remote_host =~ tr/a-zA-Z\.\-0-9//cd; + $0 = "$0 [$remote_ip : $remote_host]"; $self->SUPER::connection->start(remote_info => $remote_info,