cvs commit: qpsmtpd/lib/Qpsmtpd TcpServer.pm

[email protected] (Ask Bjoern Hansen)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     03/04/21 01:28:12

  Modified:    .        Changes
               lib/Qpsmtpd TcpServer.pm
  Log:
  Filter out all uncommon characters from the remote_host
  setting. (thanks to Frank Denis / Jedi/Sector One for the hint).
  
  Revision  Changes    Path
  1.43      +5 -0      qpsmtpd/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/Changes,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -w -r1.42 -r1.43
  --- Changes	21 Apr 2003 08:23:35 -0000	1.42
  +++ Changes	21 Apr 2003 08:28:12 -0000	1.43
  @@ -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)
   
  
  
  
  1.8       +5 -0      qpsmtpd/lib/Qpsmtpd/TcpServer.pm
  
  Index: TcpServer.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/TcpServer.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- TcpServer.pm	16 Apr 2003 16:35:14 -0000	1.7
  +++ TcpServer.pm	21 Apr 2003 08:28:12 -0000	1.8
  @@ -15,6 +15,11 @@
       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,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.