Skip to content

Commit

Permalink
Alert if query parameters are passed as part of the route
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Feb 25, 2025
1 parent 52a43fc commit 120a304
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gort/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,9 @@ async def get_lvmapi_route(route: str, params: dict = {}, timeout: float = 5, **
if route.startswith("/"):
route = route[1:]

if "?" in route:
raise ValueError("Query parameters should be passed as a dictionary.")

async with httpx.AsyncClient(
base_url=f"http://{host}:{port}/{base_route}",
follow_redirects=True,
Expand Down

0 comments on commit 120a304

Please sign in to comment.