fix(deploy): unauth health poll, validate-before-gate, fullmatch names, reload-only-on-ok

This commit is contained in:
2026-08-22 15:41:37 -06:00
parent 1bb15de258
commit 63528ff794
3 changed files with 7 additions and 5 deletions
@@ -16,7 +16,7 @@ def _path(name):
"""Resolve a profile name to its directory. HTTP-supplied names are never
trusted: reject anything but [A-Za-z0-9._-]{1,64} and explicitly refuse
'.'/'..' so traversal can never escape PROFILES_DIR."""
if not isinstance(name, str) or not NAME_RE.match(name) \
if not isinstance(name, str) or not NAME_RE.fullmatch(name) \
or name in ('.', '..'):
raise ValueError('invalid profile name')
return os.path.join(PROFILES_DIR, name)