httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Browder <tom.brow...@gmail.com>
Subject [users@httpd] Log problem with REMOTE_USER containing spaces
Date Sun, 17 Jul 2011 19:10:15 GMT
I am a new apache2 user and have started mining my access logs (with
Perl progs) for certain info.  I have had great success using the
Parse::AccessLogEntry module from cpan.org, but I have had a few
instances where it bombed on the default extended common format.

In those cases I found that a user tried to enter a $REMOTE_USER name
with spaces (e.g., "Joe Lee") and the resulting log parse bombed
because the log format does not have the %u protected by quotes.  I'm
sorry to say I've deleted those lines in the access log so I don't
know what return code was shown, but the error log shows "Digest: user
`Joe Lee' in realm `realm' not found" (name and realm disguised here).

I  can think of several solutions, but where does the real problem lie?

My thoughts:

1.  I can put quotes around the "%u" which will work for me, but now I
have to mod the parser to always expect it.
2.  Should the Apache log format be changed?  Is it a bug, or should
it become a new, named log format?
3.  Can such a user name be filtered by Apache and replace the space
with the http URL space encoding '%20' or '+'?
4.  Should the auth modules reject such names?

So far it has just been an irritant, but I would like to know is this
my problem alone, or is it something for an upstream solution?  If
it's my problem, suggested fixes will be appreciated.

Thanks and best regards,

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message