add mark fixes

Signed-off-by: Jenkins, Kenneth Alexander <kjenkins60@gatech.edu>
This commit is contained in:
Jenkins, Kenneth Alexander 2026-04-13 19:35:37 -04:00
parent ae58fa7f98
commit 37beb1eba5
No known key found for this signature in database
7 changed files with 9 additions and 1161 deletions

View file

@ -40,6 +40,12 @@ class I18nPackEndpoint:
return web.HTTPUnauthorized()
lang = request.match_info.get("lang") or "en"
# This is a path traversal defense, and is a critical sec defense.
# Do not remove!
if "/" in lang or ".." in lang:
return web.HTTPBadRequest(reason="Invalid language code")
pack = get_language_pack(lang)
return web.json_response(pack)