"

Hello ASSP developers,

I would like to report a possible bug in the BlockedMailResend() function in
ASSP 2.8.2 (build 26299).




Environment

   * ASSP version: 2.8.2 (26299)
   * Operating system: Ubuntu Linux
   * Component: BlockedMailResend()
   * Configuration: EmailResendRequester is empty.
   * We expect users to be able to resend their own blocked messages based
   on the X-Assp-Intended-For header.
   *


Problem description




Some legitimate users are unable to resend their own blocked emails.

When they request a resend, ASSP rejects the request with the following 
message:

You are not allowed to request a resend of the email-file ...




The ASSP log contains:

Warning: resend request from [email protected]

for message.eml is denied (no valid recipient found)

and ignored. The blocked mail was not intended for [email protected]!

However, the original blocked message contains:

X-Assp-Intended-For: [email protected]

The requesting address and the X-Assp-Intended-For address match exactly, 
case-insensitively.




What we have verified

We performed several checks:

   1. The original blocked message file exists and is readable.
   2. The X-Assp-Intended-For header is present and correctly formatted.
   3. The email address matches the regular expression used by ASSP.
   4. A standalone Perl test successfully extracts the address and confirms
   that it matches the requesting user.
   5. The same implementation of BlockedMailResend() is present in both 
   assp.pl and the dynamically compiled file sl-cache/main-
   BlockedMailResend.sl.


Possible cause

We suspect an issue with how the header is split and processed in
BlockedMailResend().

Around line 45538 in assp.pl, the code uses:

for my $line (split(/\r\n/o,$header)) {

Later in the same loop, the code checks for an empty line:

if ( $line eq '' ) {

    if ( $foundRecpt < 2 || @requester) {

        ...

        if (! $foundRecpt && @intended_for) {

            for (@intended_for) {

                next if lc($this->{mailfrom}) ne $_;

                ...

                $foundRecpt = 2;

                last;

            }

        }

    }

}

This is where the authorization check against @intended_for takes place.

However, Perl's split() with the default limit removes trailing empty
fields.

We reproduced this behavior:

perl -e '$s="X-Test: value\r\n\r\n"; @a=split(/\r\n/,$s); print scalar(@
a),"\n";'

Output:

1

Using a negative limit prese

 

"
_______________________________________________
Assp-test mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-test

Reply via email to