Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion plugins/teams_pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,11 @@ async def _transcribe_recording(
temp_root = self.config.tmp_dir or (get_hermes_home() / "tmp" / "teams_pipeline")
temp_root.mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory(dir=str(temp_root), prefix="teams-recording-") as tmp_dir:
recording_name = recording.display_name or f"{recording.artifact_id}.mp4"
# display_name comes from Graph API and is ultimately set by
# the meeting organizer — strip any directory components so a
# crafted name like "../../etc/cron.d/evil" can't escape tmp_dir.
raw_name = recording.display_name or f"{recording.artifact_id}.mp4"
recording_name = Path(raw_name).name or f"{recording.artifact_id}.mp4"
recording_path = Path(tmp_dir) / recording_name
await download_recording_artifact(
self.graph_client,
Expand Down
Loading