diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index e007e0a9e..684f68819 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -1477,6 +1477,10 @@ def test_api_strategy(botclient): rc = client_get(client, f"{BASE_URI}/strategy/NoStrat") assert_response(rc, 404) + # Disallow base64 strategies + rc = client_get(client, f"{BASE_URI}/strategy/xx:cHJpbnQoImhlbGxvIHdvcmxkIik=") + assert_response(rc, 500) + def test_list_available_pairs(botclient): ftbot, client = botclient @@ -1650,6 +1654,11 @@ def test_api_backtesting(botclient, mocker, fee, caplog, tmpdir): assert not result['running'] assert result['status_msg'] == 'Backtest reset' + # Disallow base64 strategies + data['strategy'] = "xx:cHJpbnQoImhlbGxvIHdvcmxkIik=" + rc = client_post(client, f"{BASE_URI}/backtest", data=json.dumps(data)) + assert_response(rc, 500) + def test_api_backtest_history(botclient, mocker, testdatadir): ftbot, client = botclient