3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

relay: check permissions before clientbot op status to prevent arbitrary join triggers

This commit is contained in:
James Lu 2018-06-07 13:20:30 -07:00
parent 9578fd5ac3
commit 141e941fcd

View File

@ -1775,6 +1775,8 @@ def link(irc, source, args):
irc.error('Cannot link two channels on the same network.')
return
permissions.checkPermissions(irc, source, ['relay.link'])
if source not in irc.channels[localchan].users:
# Caller is not in the requested channel.
log.debug('(%s) Source not in channel %s; protoname=%s', irc.name, localchan, irc.protoname)
@ -1796,8 +1798,6 @@ def link(irc, source, args):
irc.error('You must be opped in %r to complete this operation.' % localchan)
return
permissions.checkPermissions(irc, source, ['relay.link'])
if remotenet not in world.networkobjects:
irc.error('No network named %r exists.' % remotenet)
return