Add config variable supybot.commands.allowShell. #1301
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR add a new configuration variable, named
supybot.commands.allowShell
, whose help:When set to False, its effects are the following:
supybot.commands.allowShell
, so it cannot be re-enabled by an attackersupybot.directories.plugins
, so an attacker able to upload files on the server (eg. a web app / CMS) cannot load arbitrary codesupybot.directories
, so an attacker cannot write arbitrary files@export
so an attacker cannot write arbitrary files@dump
and@load
, to prevent writing and reading arbitrary files@install
to prevent installing plugins from third-party repositories, which may be vulnerable (intentionally or not)@call
and@shell
Note that when
supybot.commands.allowShell
is True it can be set to False via IRC, but if it is False, it may only be changed by editing the.conf
file.This variable defaults to True, which preserves the behavior of Limnoria before this PR.
The rational for this default is to have PluginDownloader usable by default, because installing plugins is hard for beginners.
This variable is not network-specific on purpose. There are many ways to run a command from a network in the context of another network (
@network.command
, Scheduler, ...), and I wouldn't trust myself to write code preventing all of these.Any question or remark?