Bug 1350887 - Warn when non-loopback connections are allowed; r=whimboo

MozReview-Commit-ID: LG8f5q5QbD6

--HG--
extra : rebase_source : 4e6fa8263633aeafef753e4157fce4a6f14ab78f
This commit is contained in:
Andreas Tolfsen 2017-03-28 17:06:06 +01:00
parent 272199f4fe
commit 7be8673acf

View File

@ -324,6 +324,8 @@ server.TCPListener = class {
let flags = Ci.nsIServerSocket.KeepWhenOffline;
if (this.forceLocal) {
flags |= Ci.nsIServerSocket.LoopbackOnly;
} else {
logger.warn("Server socket is not limited to loopback connections");
}
this.listener = new ServerSocket(this.port, flags, 1);
this.listener.asyncListen(this);