Add warning to [p]set api if <>s are included in secret #6253
Labels
Category: Core - Bot Commands
This is related to core commands (Core and CogManagerUI cog classes).
Good First Issue
Good for beginners to the project.
Status: In Progress
There's a PR open to deal with this, or an org member is working on this internally
Type: Feature
New feature or request.
Type of feature request
Command
Description of the feature you're suggesting
When users are instructed to set an API key with
[p]set api
, they are often told to fill in parts of the command by marking a part with something like<keyname>
(for example,[p]set api youtube api_key <your_api_key_here>
). When this is done, the user is expected to replace the entire word, including the<>
s. Sometimes users do not realize this, and enter their key within<>
s. This often breaks the API service in an unexpected way, which can be confusing for users.We can't reject keys that are wrapped in
<>
s, because they may be valid for a strange service out there, however we should warn the user to double check if their key is actually supposed to be formatted like that. All secrets should be checked to see if they start with<
and end with>
, and if so the user should be warned that they may have failed to replace the entire block, with a warning added to the confirmation message such as:There's a small concern that a key might be something entirely stupid like
<>
itself, and this would technically reveal information about the key, but I believe that is a relatively tiny concern.Anything else?
No response
The text was updated successfully, but these errors were encountered: