Re: logging blank usernames

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 28 Jul 2003 08:22:15 +0200

On Monday 28 July 2003 06.42, Adrian Chadd wrote:

> I poked Robert about it, he thinks a blank username should just be
> logged as -. Obviously the auth attempt fails.

Correct. It should be logged as -. Blank user names are never valid
and should be disregarded.

> Anyway, here's the one line patch:
>
> - user1 ? user1 : dash_str,
> + user1 ? (user1[0] == '\0' ? dash_str : user1) : dash_str,
>
> What do people think?

Better to make accessLogFormatName return NULL on blank names I think.
The logics in all log functions assumes NULL == unknown, and
addressing this in accessLogFormatName would cover all bases in one
clean go.

Note: the custom log formats handles this already. If a log format
atom results in a blank string then - is logged. But still they would
benefit from the cleaner NULL values above.

Regards
Henrik
Received on Mon Jul 28 2003 - 00:22:27 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:17 MST