[rt-users] RT misparsing From header

Smylers smylers at gbdirect.co.uk
Fri May 3 05:29:15 EDT 2002


Yesterday Sebastian Flothow wrote:

> At 9:30 Uhr +0100 22.4.2002, Smylers wrote:
>
> >   http://lists.fsck.com/pipermail/rt-users/2002-March/007455.html
>
> I applied the modification proposed at the end of this post, which
> solves the problem (and doesn't cause any new problems as far as I can
> see).
>
> Jesse: will this be included in a future version of RT?
>
> > > This is RT 2.0.13, sending mail via qmail.
> >
> > We're using 'Exim'; Phil Oester who had the problem last time uses
> > 'Sendmail'.  This could be significant.
>
> Well, it supports the assumption that there's nothing wrong with the
> MTA.

Except that we _don't_ get the problem with 'Exim'.  My mail quoted
above was written theoretically, based on what I expected to happen, not
on me having experienced the problem.

Jesse asked me to test Simon Cozen's patch (referred to earlier in that
March thread) so I created a user with quote marks in their real name
and, but couldn't actually coax my system into failing in the way I'd
expected either with or without Simon's patch.

In other words, for me at least, the current 'RT' code works fine though
I don't understand why.  It could be that 'Exim' is doing something
funky to compensate for dodgy quotes, or it could be something entirely
different.

> > Can you look up the entry for Joe Random's user account in 'RT' and
> > look to see what his real name is set to.  In particular, does it
> > have quotes in it?
>
> It's set to "Random, Joe", including the quotes.

That's what I suspected, and is what I set up when trying and failing to
reproduce this behaviour.

> > It looks like quotes are being added in two places (one of them
> > probably being when "via RT" is appended).
>
> Not quite - RT adds quotes only once, when "via RT" is appended, which
> causes trouble if the name already has quotes.

Fair enough; what I meant is that the across the entire system there are
two places where quotes are being added.  The first quotes are
(correctly) added by the requestor's MUA; they are first added into 'RT'
when that user is created.

> Thus, another way of fixing this would be to strip quotes when users
> are auto-created on ticket creation.

Yes -- it's probably more sensible to ensure that no quotes end up in
that field in the first place, than to have to remove them every time a
mail is sent.  (Especially since typically each user created will
receive several mails.)

But I've just realized the disadvantage of that: stripping quotes on the
way in doesn't help with any users already in your database with quotes
in them.  You'd also need a script to iterate through the DB and remove
quotes from existing users, which is considerably more effort.

Cheers.

Smylers
-- 
GBdirect
http://www.gbdirect.co.uk/





More information about the rt-users mailing list