Skip to content

Commit 60e6dd0

Browse files
committed
fix(empty value in secret expansion):
1 parent c97e436 commit 60e6dd0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

agentic_security/http_spec.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ def encode_audio_base64_by_url(url: str) -> str:
2727
return "data:audio/mpeg;base64," + encoded_content
2828

2929

30-
class InvalidHTTPSpecError(Exception):
31-
...
30+
class InvalidHTTPSpecError(Exception): ...
3231

3332

3433
class LLMSpec(BaseModel):
@@ -169,6 +168,8 @@ def parse_http_spec(http_spec: str) -> LLMSpec:
169168
has_audio = "<<BASE64_AUDIO>>" in body
170169

171170
for key, value in secrets.items():
171+
if not value:
172+
continue
172173
key = key.strip("$")
173174
body = body.replace(f"${key}", value)
174175

0 commit comments

Comments
 (0)