You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: make_request_and_raise_if_error_async drops repeated query parameters from the endpoint URL #3510
make_request_and_raise_if_error_async in pyrit/common/net_utility.py keeps only the first value of a query parameter that appears more than once in endpoint_uri. It reads the URL's query with extract_url_parameters, which flattens parse_qs to a dict[str, str] using v[0], merges extra_url_parameters into that dict, and sends the dict to httpx as params. So https://api.example.com/search?tag=a&tag=b is requested as https://api.example.com/search?tag=a, and tag=b is silently dropped.
Repeated keys are a common way to pass a list (?id=1&id=2, ?fields=a&fields=b), so a request to such an endpoint silently asks for something different from what the caller wrote. The function is used by AzureMLChatTarget, PromptShieldTarget, HackAPromptTarget and the remote dataset image downloads, which pass the URL they are given. This happens with and without extra_url_parameters.
Activity