mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-03-01 15:52:43 +00:00
fix: disallow base64 strategies through rpc endpoints
This commit is contained in:
@@ -6,7 +6,7 @@ from fastapi import APIRouter, Depends, HTTPException
|
||||
from freqtrade.configuration import validate_config_consistency
|
||||
from freqtrade.rpc.api_server.api_pairlists import handleExchangePayload
|
||||
from freqtrade.rpc.api_server.api_schemas import PairHistory, PairHistoryRequest
|
||||
from freqtrade.rpc.api_server.deps import get_config, get_exchange
|
||||
from freqtrade.rpc.api_server.deps import get_config, get_exchange, verify_strategy
|
||||
from freqtrade.rpc.rpc import RPC
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ def pair_history(
|
||||
config=Depends(get_config),
|
||||
exchange=Depends(get_exchange),
|
||||
):
|
||||
verify_strategy(strategy)
|
||||
# The initial call to this endpoint can be slow, as it may need to initialize
|
||||
# the exchange class.
|
||||
config_loc = deepcopy(config)
|
||||
@@ -45,6 +46,7 @@ def pair_history(
|
||||
|
||||
@router.post("/pair_history", response_model=PairHistory, tags=["Candle data"])
|
||||
def pair_history_filtered(payload: PairHistoryRequest, config=Depends(get_config)):
|
||||
verify_strategy(payload.strategy)
|
||||
# The initial call to this endpoint can be slow, as it may need to initialize
|
||||
# the exchange class.
|
||||
config_loc = deepcopy(config)
|
||||
|
||||
Reference in New Issue
Block a user