Skip to content

Commit 6117505

Browse files
committed
feat: merge PR averygan#24 (yt-dlp fix) + PR averygan#3 (security hardening, memory leak, UX)
- Pin yt-dlp>=2026.3.17 to fix YouTube SABR 403 errors (fixes averygan#8) - Add --upgrade-deps to reclip.sh venv setup - Add URL validation (http/https only) - Add format_id sanitization against yt-dlp flag injection - Add job_id format validation - Add path traversal protection on file serving - Add non-root user in Dockerfile - Add threading lock for jobs dict (race condition fix) - Add job TTL auto-purge (1hr) + MAX_JOBS cap (500) - Add /api/cleanup endpoint + frontend cleanup call after download - Add structured logging + type hints - Fix dlAll() to await each download via Promise-based polling - Add ARIA labels on interactive elements - Improve title sanitization (80 char limit) - reclip.sh: always run pip install on venv reuse - reclip.sh: add EXIT trap for clean shutdown message
1 parent 37effdc commit 6117505

6 files changed

Lines changed: 297 additions & 86 deletions

File tree

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ downloads/
33
__pycache__/
44
*.pyc
55
assets/*.mov
6+
assets/*.mp4
7+
assets/*.mkv
8+
assets/*.webm
69
.DS_Store
710
.env
8-
.env.local
9-
.env.production
10-
.env.development
11+
.vscode/

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ RUN apt-get update && \
44
apt-get install -y --no-install-recommends ffmpeg && \
55
rm -rf /var/lib/apt/lists/*
66

7+
# Run as non-root user
8+
RUN useradd --create-home --shell /bin/bash reclip
79
WORKDIR /app
810
COPY requirements.txt .
911
RUN pip install --no-cache-dir -r requirements.txt
1012

1113
COPY . .
14+
RUN mkdir -p downloads && chown -R reclip:reclip /app
15+
16+
USER reclip
1217

1318
EXPOSE 8899
1419
ENV HOST=0.0.0.0

0 commit comments

Comments
 (0)