fix(remote): harden serve API access control and input handling

Bind sessions and download jobs to the API key (not source IP), reject path-traversal cache keys, bound decompression of peer-supplied blobs, gate the CDM device before the vault fallback, and compare API keys in constant time.
This commit is contained in:
imSp4rky
2026-07-06 23:54:05 -06:00
parent 84d9b92530
commit 5cd50544a8
8 changed files with 121 additions and 25 deletions
+1
View File
@@ -35,6 +35,7 @@ class SessionEntry:
tracks_by_title: Dict[str, Dict[str, Track]] = field(default_factory=dict) # title_key -> {track_id -> Track}
chapters_by_title: Dict[str, List[Any]] = field(default_factory=dict) # title_key -> [Chapter]
creator_ip: Optional[str] = None
owner_key: Optional[str] = None # X-Secret-Key that owns this session
cache_tag: Optional[str] = None # per-session cache directory tag
input_bridge: Optional[InputBridge] = None
auth_status: AuthStatus = AuthStatus.AUTHENTICATED