mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-24 15:31:08 +00:00
irc: ensure only privileged accounts may follow/unfollow
This commit is contained in:
parent
3e446bc584
commit
94d4efbe11
|
@ -123,6 +123,11 @@ class IRCProtocol(asyncio.Protocol):
|
||||||
elif 'whois' in action:
|
elif 'whois' in action:
|
||||||
self.whois(nickname, action['whois'], account)
|
self.whois(nickname, action['whois'], account)
|
||||||
elif 'follow' in action:
|
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'])
|
logging.info('allowed follow: %r', action['follow'])
|
||||||
self.follow(nickname, action['follow'])
|
self.follow(nickname, action['follow'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue