fix(cookbook): validate adopt host (#4282)

This commit is contained in:
RaresKeY
2026-06-15 17:44:24 +03:00
committed by GitHub
parent 81e7074d93
commit ffd0aaf69b
2 changed files with 51 additions and 1 deletions
+1 -1
View File
@@ -790,7 +790,7 @@ def setup_codex_routes(
norm = dict(body or {})
sess = (norm.get("tmux_session") or norm.get("session_id") or "").strip()
model = (norm.get("model") or norm.get("repo_id") or "").strip()
host = (norm.get("host") or norm.get("remote_host") or "").strip()
host = validate_remote_host((norm.get("host") or norm.get("remote_host") or "").strip() or None) or ""
port = norm.get("port") or 8000
import re as _re
if not sess or not _re.fullmatch(r"[a-zA-Z0-9_-]+", sess):