- #3: Path traversal fix in /archive and /archive-file routes via resolve() check - #4: SSRF mitigation - env-based SERVER_URL, no hardcoded internal IPs - #5: Stored XSS fix - remove |safe filter from article.html template - #6: Missing import os in scheduler.py (crash on import) - #7: Flask auth (password via NEWSARCHIVER_PASSWORD) + CSRF tokens - #8: Same as #5 (template XSS via |safe) - #9: Motley Fool API key removed - use env var interpolation - #10: Hardcoded paths in setup_cron.sh, stop_services.sh - use BASH_SOURCE - #11: Hardcoded user paths in singlefile_archive.py - use Path.home() - #16: HTTP RSS feeds updated to HTTPS (Barchart, Guardian, BBC, MarketWatch) - #24: SSRF - replace hardcoded 192.168.8.150:5000 with NEWSARCHIVER_SERVER_URL - #25: Command execution details sanitized in error messages - #26: Security headers (X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy, CSP) - #27: Auth guard on all routes except RSS/Atom feeds - archive_engine.py: Add missing import os
19 lines
528 B
Bash
19 lines
528 B
Bash
#!/bin/bash
|
|
# Stop NewsArchiver services
|
|
|
|
echo "Stopping NewsArchiver services..."
|
|
|
|
# Stop web server
|
|
pkill -f "run_archiver.py --serve" 2>/dev/null || true
|
|
echo "Web server stopped"
|
|
|
|
# Stop scheduler
|
|
pkill -f "run_archiver.py --interval" 2>/dev/null || true
|
|
echo "Scheduler stopped"
|
|
|
|
# Remove lock file
|
|
LOCK_FILE="${NEWSARCHIVER_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}/archival_data/.scheduler.lock"
|
|
rm -f "$LOCK_FILE" 2>/dev/null || true
|
|
echo "Scheduler lock file removed"
|
|
|
|
echo "All NewsArchiver services stopped" |