Forums » Development »
[Solved] Patch: mask IP addresses in access log
Added by pc over 1 year ago
Hi,
I have created a patch that allows partial masking of IP addresses in access logs. (Motivation: privacy compliance, similar to https://github.com/webfactory/mod_log_ipmask .)
What's the procedure for submitting lighttpd patches? If possible I'd simply push my git branch to some server from which you can pull it.
cu,
Peter
Replies (5)
RE: Patch: mask IP addresses in access log - Added by gstrauss over 1 year ago
Please submit a pull request to https://github.com/lighttpd/lighttpd1.4/pulls where we can discuss the patch.
Discussions occur before pulls. ;)
I am generally of the opinion that arbitrary log munging should be done by a piped logger.
e.g. GDPR question: https://redmine.lighttpd.net/boards/2/topics/8097
Alternatively, the access log could potentially be generated using mod_magnet and some custom lua script.
Of course, if an IP address should not appear in an access log, then it is best to simply omit it from the access log.
RE: Patch: mask IP addresses in access log - Added by gstrauss over 1 year ago
mod_log_ipmask is GPL-3.0. https://github.com/webfactory/mod_log_ipmask
If you are trying to extend mod_accesslog format specifier %a and %h, you must do so based only on the written spec description, and must represent as such in the pull request. lighttpd uses the BSD-3-clause license, and contributions must be compatible. Thank you.
RE: Patch: mask IP addresses in access log - Added by gstrauss over 1 year ago
IPv4 and IPv6 should be supported, and the code should not fail if the remote addr is a unix domain socket.
RE: Patch: mask IP addresses in access log - Added by pc over 1 year ago
Thanks. I wrote this from scratch. Is the explanation in the PR sufficient?
https://github.com/lighttpd/lighttpd1.4/pull/124
RE: Patch: mask IP addresses in access log - Added by gstrauss over 1 year ago
Thanks! That's a good start. Thank you for giving this a shot. My code reviews might be heavy critiques with the goal of being brief, to the point, and getting something done, so I wanted to say that you for the effort in advance.