[Core] Users may accidentally lock guild owner and themselves with [p]localwhitelist add #3222

Closed
opened 2019-12-26 01:19:16 +01:00 by Jackenmen · 3 comments
Jackenmen commented 2019-12-26 01:19:16 +01:00 (Migrated from github.com)

Command bugs

Command name

[p]localwhitelist add

What cog is this command from?

Core

What were you expecting to happen?

I was expecting to get an error saying that I can't lock out myself (and guild owner) from using the bot.

What actually happened?

I locked myself and guild owner out.

How can we reproduce this issue?

  1. Have permissions to use [p]localwhitelist (e.g. have admin role), but don't be bot owner.
  2. Use [p]localwhitelist clear
  3. Use [p]localwhitelist add SOMEONE_ELSES_USER_ID

This doesn't seem like a trivial task but it would surely be great to have it improved.

# Command bugs #### Command name `[p]localwhitelist add` #### What cog is this command from? Core #### What were you expecting to happen? I was expecting to get an error saying that I can't lock out myself (and guild owner) from using the bot. #### What actually happened? I locked myself and guild owner out. #### How can we reproduce this issue? 1. Have permissions to use `[p]localwhitelist` (e.g. have admin role), but don't be bot owner. 2. Use `[p]localwhitelist clear` 3. Use `[p]localwhitelist add SOMEONE_ELSES_USER_ID` --- This doesn't seem like a trivial task but it would surely be great to have it improved.
mikeshardmind commented 2020-01-04 05:16:03 +01:00 (Migrated from github.com)

We can't escape this case in any good way at the command level. We can do like with bot owner and the global list, and at least exclude the guild owner from being checked by local whitelist/blacklist so that there's always at least 1 authoritative person with a way to fix that specific issue.

While it would prevent a bot owner from localblacklisting a guild owner, I'd argue the bot owner has more powerful tools such as blacklisting the entire server, leaving a server, or the global bot settings. for blacklisting

We can't escape this case in any good way at the command level. We can do like with bot owner and the global list, and at least exclude the guild owner from being checked by local whitelist/blacklist so that there's always at least 1 authoritative person with a way to fix that specific issue. While it would prevent a bot owner from localblacklisting a guild owner, I'd argue the bot owner has more powerful tools such as blacklisting the entire server, leaving a server, or the global bot settings. for blacklisting
Jackenmen commented 2020-05-24 04:21:00 +02:00 (Migrated from github.com)

This issues has been in triage status for a while, and it really needs some fix.

PRs excluding guild owner from local whitelist/blacklist checks are very much welcome.

Looks like the important (the more trivial) part of this issue has already been fixed.

It would be awesome if the commands were "smart" and knew whether you would lock yourself out when running them but it's not trivial and since there is at least one person in the guild who can still fix the localwhitelist problem, it isn't a priority.

~~This issues has been in triage status for a while, and it really needs some fix.~~ ~~PRs excluding guild owner from local whitelist/blacklist checks are very much welcome.~~ Looks like the important (the more trivial) part of this issue has already been fixed. It would be awesome if the commands were "smart" and knew whether you would lock yourself out when running them but it's not trivial and since there is at least one person in the guild who can still fix the localwhitelist problem, it isn't a priority.
Jackenmen commented 2020-05-25 02:48:27 +02:00 (Migrated from github.com)

Looks like the part that badly needed the fix was already fixed around the time this issue was created. I updated my previous comment to reflect this.

Looks like the part that badly needed the fix was already fixed around the time this issue was created. I updated my previous comment to reflect this.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#3222
No description provided.