chore: checkpoint local wip for issue 892

This commit is contained in:
Alexander Whitestone
2026-04-05 13:31:06 -04:00
parent f8f5d08678
commit d7abb7db36
47 changed files with 113 additions and 149 deletions

View File

@@ -1,8 +1,7 @@
import os
def fix_l402_proxy():
path = "src/timmy_serve/l402_proxy.py"
with open(path, "r") as f:
with open(path) as f:
content = f.read()
# 1. Add hmac_secret to Macaroon dataclass
@@ -132,7 +131,7 @@ if _MACAROON_SECRET_RAW == _MACAROON_SECRET_DEFAULT or _HMAC_SECRET_RAW == _HMAC
def fix_xss():
# Fix chat_message.html
path = "src/dashboard/templates/partials/chat_message.html"
with open(path, "r") as f:
with open(path) as f:
content = f.read()
content = content.replace("{{ user_message }}", "{{ user_message | e }}")
content = content.replace("{{ response }}", "{{ response | e }}")
@@ -142,7 +141,7 @@ def fix_xss():
# Fix history.html
path = "src/dashboard/templates/partials/history.html"
with open(path, "r") as f:
with open(path) as f:
content = f.read()
content = content.replace("{{ msg.content }}", "{{ msg.content | e }}")
with open(path, "w") as f:
@@ -150,7 +149,7 @@ def fix_xss():
# Fix briefing.html
path = "src/dashboard/templates/briefing.html"
with open(path, "r") as f:
with open(path) as f:
content = f.read()
content = content.replace("{{ briefing.summary }}", "{{ briefing.summary | e }}")
with open(path, "w") as f:
@@ -158,7 +157,7 @@ def fix_xss():
# Fix approval_card_single.html
path = "src/dashboard/templates/partials/approval_card_single.html"
with open(path, "r") as f:
with open(path) as f:
content = f.read()
content = content.replace("{{ item.title }}", "{{ item.title | e }}")
content = content.replace("{{ item.description }}", "{{ item.description | e }}")
@@ -168,7 +167,7 @@ def fix_xss():
# Fix marketplace.html
path = "src/dashboard/templates/marketplace.html"
with open(path, "r") as f:
with open(path) as f:
content = f.read()
content = content.replace("{{ agent.name }}", "{{ agent.name | e }}")
content = content.replace("{{ agent.role }}", "{{ agent.role | e }}")