rpc: prevent backupwallet method (#298)

This commit is contained in:
phm87 2018-09-03 12:31:49 +02:00 committed by Tanguy Pruvot
parent 1da40e518a
commit f93b3df225
2 changed files with 2 additions and 2 deletions

View file

@ -135,7 +135,7 @@ class Bitcoin {
// The ID should be unique for each call
$this->id++;
if (stripos($method, 'dump') !== false) {
if (stripos($method, 'dump') !== false || stripos($method, 'backupwallet') !== false) {
$this->error = "$method method is not authorized!";
return FALSE;
}

View file

@ -55,7 +55,7 @@ class WalletRPC {
function __call($method, $params)
{
if (stripos($method, "dump") !== false) {
if (stripos($method, "dump") !== false || stripos($method, "backupwallet") !== false) {
$this->error = "$method not authorized!";
debuglog("$method rpc method is not authorized!");
return false;