Bug 46868 - SocketHUBAppender: Allow restriction of binding to localhost or local interface (with patch)
Summary: SocketHUBAppender: Allow restriction of binding to localhost or local interfa...
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: 1.2
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-17 08:15 UTC by Hendrik Brummermann
Modified: 2012-05-25 19:02 UTC (History)
0 users



Attachments
socket-hub-appender--restrict-bind.patch (3.28 KB, patch)
2009-03-17 08:15 UTC, Hendrik Brummermann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik Brummermann 2009-03-17 08:15:47 UTC
Created attachment 23392 [details]
socket-hub-appender--restrict-bind.patch

Hi,

the SocketHUBAppender opens a TCP server sockets and waits for connections by clients. It will then send the log events to those clients.

While this is a very cool feature during development it is not desireable to allow anyone on the internet to connect to this port and receive logging events.

The attached untested patch adds a new property "BindAddress". If it is set to a non-null value, the server socket will only bind to the interfaced identified by this ip-address.

Note: This patch is totally compatible because an unset "BindAddress" property will show the old behaviour of binding to all interfaces.
Comment 1 Curt Arnold 2009-10-10 11:33:09 UTC
Changing the signature of a protected method is an API break and starting names with an underscore doesn't fit with our coding standards, so the patch as submitted is not acceptable, however it seems like a good idea.