Re: Patch: FATAL PLUGIN ERROR [check_basicheaders]: ...

[email protected] (Charlie Brady)
Newsgroups perl.qpsmtpd
Message-ID <[email protected]>
On Fri, 12 Nov 2010, Charlie Brady wrote:

> 
> On Thu, 11 Nov 2010, Robert Spier wrote:
> 
> > I took a very quick look, and it's not clear what you're trying to
> > protect against. 
> > 
> > Are you trying to protect against $transaction->headers() returning
> > nothing? 
> 
> Yes.
> 
> > If so, this will still break when someone tries to get the
> > date header.
> 
> That code won't happen, because of the return(DENY, ...).

Sorry, that should be:

That won't happen ...

or

That code won't be executed...

> 
> > -R
> > 
> > Charlie Brady wrote:
> > > 
> > > 
> > > Do I need to do something more to have this considered for merging?
> > > 
> > > On Mon, 8 Nov 2010, Charlie Brady wrote:
> > > 
> > > > 
> > > > check_basicheaders fails if there are no headers at all:
> > > > 
> > > > http://bugs.contribs.org/show_bug.cgi?id=6345
> > > > 
> > > > --- a/plugins/check_basicheaders
> > > > +++ b/plugins/check_basicheaders
> > > > @@ -46,10 +46,11 @@ sub hook_data_post {
> > > >    return (DENY, "You have to send some data first")
> > > >      if $transaction->data_size == 0;
> > > >  
> > > > +  my $header = $transaction->header;
> > > >    return (DENY, "Mail with no From header not accepted here")
> > > > -    unless $transaction->header->get('From');
> > > > +    unless $header && $header->get('From');
> > > >  
> > > > -  my $date = $transaction->header->get('Date');
> > > > +  my $date = $header->get('Date');
> > > >  
> > > >    return (DENY, "Mail with no Date header not accepted here")
> > > >      unless $date;
> > > > 
> > > > 
> > 
>
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.