From: Christian Gleerup <christian.gleerup@swn.nu>
To: mlmmj@mlmmj.org
Subject: Re: [mlmmj] Cannot remove mail adress
Date: Wed, 06 Oct 2010 20:19:46 +0000 [thread overview]
Message-ID: <1286396386.1803.30.camel@cg-desktop> (raw)
In-Reply-To: <1285524372.2905.16.camel@cg-desktop>
Hi Ben,
I subscribed from a PHP script using mlmmj-sub.
The input comes from a textarea, where multiple mails are delimeted by
'line changes' (whatever the browser uses. seems like '\r\n')
I split into an array on '\n' and send to command line, to be excact:
$addressA = explode("\n", $_REQUEST['address']);
foreach ($addressA as $a) {
$a = trim($a); // Didn't trim when the bad mail was injected
exec("sudo /usr/bin/mlmmj-sub -L /var/spool/mlmmj/nyhedsbrev/ -a {$a}
-s");
}
By the way, php describes trim like....
This function returns a string with whitespace stripped from the
beginning and end of str. Without the second parameter, trim() will
strip these characters:
* " " (ASCII 32 (0x20)), an ordinary space.
* "\t" (ASCII 9 (0x09)), a tab.
* "\n" (ASCII 10 (0x0A)), a new line (line feed).
* "\r" (ASCII 13 (0x0D)), a carriage return.
* "\0" (ASCII 0 (0x00)), the NUL-byte.
* "\x0B" (ASCII 11 (0x0B)), a vertical tab.
ons, 06 10 2010 kl. 18:55 +1100, skrev Ben Schmidt:
> On 2/10/10 6:27 PM, Mads Martin Jørgensen wrote:
> > On Sat, Oct 2, 2010 at 10:14 AM, Christian Gleerup
> > <christian.gleerup@swn.nu> wrote:
> >> I just checked the file, and it indeed contained a whitespace character
> >> (\r)
> >>
> >> this must have been an error when I made the mass subscribe system,
>
> In what way did this interface with Mlmmj? Do you know where the
> carriage return came from in the first place? Would it have appeared in
> a commandline argument to mlmmj-sub? Or...?
>
> >> I will look out for this, but it would be nice if the system was a
> >> bit more robust, and automatically removed trailing whitespaces :)
> >
> > I believe it does remove trailing whitespaces, but that's not a
> > whitespace, that's a carriage return.
>
> I think that's a whitespace. Non-linear, but still whitespace.
>
> > We agree that it should be able to handle it, and be more robust,
> > since \r is not a valid emailaddress character.
>
> Yep. We all agree it would be nice to guard against this!
>
> Ben.
>
>
>
next prev parent reply other threads:[~2010-10-06 20:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-26 18:06 [mlmmj] Cannot remove mail adress Christian Gleerup
2010-09-26 19:08 ` Mads Martin Jørgensen
2010-09-28 18:06 ` Christian Gleerup
2010-09-29 6:20 ` Mads Martin Jørgensen
2010-09-29 22:42 ` Ben Schmidt
2010-10-02 8:14 ` Christian Gleerup
2010-10-02 8:27 ` Mads Martin Jørgensen
2010-10-06 7:55 ` Ben Schmidt
2010-10-06 10:50 ` Mads Martin Jørgensen
2010-10-06 11:07 ` Christian Laursen
2010-10-06 11:19 ` Ben Schmidt
2010-10-06 11:40 ` Franky Van Liedekerke
2010-10-06 20:19 ` Christian Gleerup [this message]
2010-10-06 22:29 ` Ben Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286396386.1803.30.camel@cg-desktop \
--to=christian.gleerup@swn.nu \
--cc=mlmmj@mlmmj.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.