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:
parent
9578fd5ac3
commit
141e941fcd
@ -1775,6 +1775,8 @@ def link(irc, source, args):
|
|||||||
irc.error('Cannot link two channels on the same network.')
|
irc.error('Cannot link two channels on the same network.')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
permissions.checkPermissions(irc, source, ['relay.link'])
|
||||||
|
|
||||||
if source not in irc.channels[localchan].users:
|
if source not in irc.channels[localchan].users:
|
||||||
# Caller is not in the requested channel.
|
# Caller is not in the requested channel.
|
||||||
log.debug('(%s) Source not in channel %s; protoname=%s', irc.name, localchan, irc.protoname)
|
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)
|
irc.error('You must be opped in %r to complete this operation.' % localchan)
|
||||||
return
|
return
|
||||||
|
|
||||||
permissions.checkPermissions(irc, source, ['relay.link'])
|
|
||||||
|
|
||||||
if remotenet not in world.networkobjects:
|
if remotenet not in world.networkobjects:
|
||||||
irc.error('No network named %r exists.' % remotenet)
|
irc.error('No network named %r exists.' % remotenet)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user