[Kolab-devel] Urgent: Re: steffen: kolabfilter.php, 1.9, 1.10

Bernhard Reiter bernhard at intevation.de
Fri Dec 17 15:07:24 CET 2004


This commit seems to be a regression in that case sensitive from from: 
comparison fail again. :-(

On Tuesday 23 November 2004 12:48, cvs at intevation.de wrote:
> Author: steffen

> /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/res
>mgr/kolabfilter.php,v retrieving revision 1.9
> retrieving revision 1.10
> diff -u -d -r1.9 -r1.10

> @@ -84,16 +102,13 @@
>    $line = rtrim( $buffer, "\r\n");
>    if( $line == '' ) {
>      // Done with headers
> -  } else if( eregi( '^From:(.*)', $line, $regs ) ) {
> -    $adrs = imap_rfc822_parse_adrlist($regs[1], $params['email_domain']);
> -    foreach( $adrs as $adr ) {
> -      $from = strtolower($adr->mailbox.'@'.$adr->host);

$from has been transformed to lowercase in the old version

> -      if( !verify_sender( $sender, $from) ) {
> -	myLog("Invalid From: header. $from does not match envelope $sender\n",
> RM_LOG_DEBUG); -	fwrite(STDOUT,"Invalid From: header. $from does not match
> envelope $sender\n"); -	exit(EX_UNAVAILABLE);
> -      }
> -    }
> +  } else if( $params['verify_from_header'] && eregi( '^From:(.*)', $line, $regs ) ) { 
>+    $from = $regs[1];

Here it is not lowercases as far as I can see.
Shouldn't this be 
  $from = strtolower($regs[1]);
?


> +    if( !verify_sender( $sender, $from) ) {
> +      myLog("Invalid From: header. $from does not match envelope
> $sender\n", RM_LOG_DEBUG); +      fwrite(STDOUT,"Invalid From: header.
> $from does not match envelope $sender\n"); +      exit(EX_UNAVAILABLE);
> +    }
>    } else if( eregi( '^Content-Type: text/calendar', $line ) ) {
>      $ical = true;
>    }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2145 bytes
Desc: signature
URL: <http://lists.kolab.org/pipermail/devel/attachments/20041217/f617c675/attachment.p7s>


More information about the devel mailing list