Skip to content

Commit

Permalink
SECURITY: Prevent changing other servers' settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenny2github committed Jan 2, 2023
1 parent a5e1ac9 commit a947d7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kenny2automate/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ async def save_server(self, request):
param['ping'] = '|'.join(param.get('ping', ())) or None
params.append(param)
otherparams['guild_id'] = guild.id
if set(param['channel_id'] for param in params) \
- set(channel.id for channel in guild.channels): # is not empty
raise web.HTTPBadRequest
try:
with self.db.connection:
self.db.executemany(
Expand Down

0 comments on commit a947d7c

Please sign in to comment.