Protect reload plugin command with allow remote admin option

fd03350b9e introduced a new option
to disable remote plugin administration.

Require reloading plugins to be explicitly allowed with:

  plugins.allowRemoteAdmin = true

Change-Id: I2946202dd40af8b4197212fb15a488b166883d8a
This commit is contained in:
David Ostrovsky
2014-03-09 19:30:48 +01:00
parent 65df1358a1
commit 29e3289a37

View File

@@ -41,6 +41,9 @@ final class PluginReloadCommand extends SshCommand {
@Override
protected void run() throws UnloggedFailure {
if (!loader.isRemoteAdminEnabled()) {
throw die("remote plugin administration is disabled");
}
if (names == null || names.isEmpty()) {
loader.rescan();
} else {