From 94d4efbe1140f06719fb395a0c2601d700fc0845 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 17 Aug 2018 19:56:18 -0500 Subject: [PATCH] irc: ensure only privileged accounts may follow/unfollow --- viera/irc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/viera/irc.py b/viera/irc.py index 61a5b91..660864c 100644 --- a/viera/irc.py +++ b/viera/irc.py @@ -123,6 +123,11 @@ class IRCProtocol(asyncio.Protocol): elif 'whois' in action: self.whois(nickname, action['whois'], account) elif 'follow' in action: + data = fetch_auth(account) + if not data: + return + if data not in IRC_CONFIG['privileged']: + return logging.info('allowed follow: %r', action['follow']) self.follow(nickname, action['follow'])