OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: SMTP-SASL auth failure caching.

From: Victor Duchovni (Victor.DuchovniMorganStanley.com)
Date: Sat Dec 01 2007 - 16:34:22 CST


On Sat, Dec 01, 2007 at 07:24:16PM +0000, Keean Schupke wrote:

> >
> > May want to validate the DSN string here, and perhaps use strtol()
> > or sscanf() instead of atol() to check for trailing junk, ...
>
> The alldig(buf) check makes sure there is no trailing junk, but proper
> validation would be better.

Actually, the alldig() is probably enough, missed that test. Testing
the validity of the DSN ([45].X.Y) string is likely still a good idea.

> > > + smtp_sasl_make_cache_key(buf, session->host,
> > > +}
> >
> > With SASL soft failures, the DSN should perhaps be downgraded from 5XX
> > to 4XX here? And validated somewhere to be either a 5XX or 4XX?
> >
>
> The downgrading happens automatically, the cache_update happens after
> the resp->dsn has been changed by the soft_bounce patch. So no need to
> alter things on the query side.

OK, but the value from the cache may have been from a time with different
settings, so the cache results may need downgrading.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.