From 09a17b32be7c7f01867b93b93f19a872eb5399f7 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 31 Jan 2018 20:04:05 -0500 Subject: [PATCH] disallow WEBIRC after PROXY --- irc/gateways.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irc/gateways.go b/irc/gateways.go index 8942ff55..5916c4ff 100644 --- a/irc/gateways.go +++ b/irc/gateways.go @@ -41,7 +41,7 @@ func (wc *webircConfig) Populate() (err error) { // WEBIRC [:flag1 flag2=x flag3] func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { // only allow unregistered clients to use this command - if client.registered { + if client.registered || client.proxiedIP != "" { return false } @@ -93,7 +93,7 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { // http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt func proxyHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { // only allow unregistered clients to use this command - if client.registered { + if client.registered || client.proxiedIP != "" { return false }