Commit Graph

14 Commits

Author SHA1 Message Date
forust e93e68db7e fix(server): harden deployment, media, state, jobs
- Lock down /media/: deny state.json, DBs, sessions; allowlist extensions incl. archives/docs (M-1)
- parse_bool() fixes; HEAD 404; shutdown drains queue; range edge cases (M-3, M-4, M-7, M-8)
- int() coercion -> 400; no filesystem paths in errors; path-only access log (M-19, L-1)
- Security headers, QR TTL 60s, trusted-host allowlist, legacy add/remove via update() (L-4, L-5, L-6, L-8)
- Clean continuous channels on import and migration; restart-during-drain; tombstone managers (F-1, F-3, F-4)
- Durability: fsync + unique tmp + stale sweep + 0600/0700 perms (M-10, M-18)
- Jobs run on dedicated loop thread; set_scrape_media passthrough; media chunked; state throttled;
  exact media file reuse; honest scrape failure status (M-11, M-12, M-13, M-14)
- Health aggregates per-account; legacy GETs delegate post-migration (M-15, M-9)
- k8s: runAsNonRoot 1000 + resource limits, no readOnlyRootFilesystem (M-16)
- UI: dropped-invalid and credentials-reentry toasts; swagger XSS-safe (F-2, L-9, L-2)
- CI: non-blocking pip-audit job in both workflows (L-3)
- 50 tests passing; REVIEW.md updated (C-1/M-20 won't fix: local-only by design)
2026-09-07 12:36:33 +02:00
forust a2468a2a2c fix(server): harden auth, SSE, state, scraping
- Fix SSE streams not terminating on successful jobs (C-2)
- Anchor data/session paths to BASE_DIR instead of CWD (C-3)
- Guard TelegramAuthManager state with RLock (H-1)
- Replace millisecond job ids with uuid4 (H-2)
- Always redact api_id/api_hash on export, drop include_secrets (H-3)
- Enforce JSON content-type + same-origin on mutating requests (H-4)
- Rate-limit auth attempts and phone-code requests (H-5)
- Deep-copy StateStore.load() on all paths (H-6)
- Cap FloodWait retries in forward_message (H-7)
- De-duplicate forwarding handler registration (H-8)
- Validate continuous channels at ingest, join scrape thread on account
  removal, fix refresh_config status under lock, cap SSE streams and
  JSON body size (M-5, M-6, M-17)
- Add regression tests (33 passing) and REVIEW.md
2026-09-07 11:54:13 +02:00
forust ff1ca13a03 feat: harden multi-account backend and add tests 2026-06-27 21:47:45 +02:00
forust 1bd385e054 fix: add WAL mode for session SQLite to prevent 'database is locked', persist active account tab in localStorage 2026-06-27 15:45:05 +02:00
forust 220d04b3a6 feat: make scraper and job service account-aware
- OptimizedTelegramScraper accepts account_id parameter;
  sets DATA_DIR to data/accounts/<id>/ when provided
- Session path uses account_session_path() for per-account session files
- initialize_client() reads per-account credentials from account state store
- ScraperJobService passes account_id from payload to scraper constructor
- Per-account state loaded from AccountStateStore before scraping
2026-06-27 15:20:15 +02:00
forust ac5beb831b lint: fix bare except and unused variables 2026-06-19 11:52:30 +02:00
forust d49fe28f08 Refactor server state and add health checks 2026-05-24 22:24:13 +02:00
forust ff000e88d4 Enchance weblog 2026-04-26 23:21:26 +02:00
forust 535b8195ef Prepare scraper for shared data and server mode 2026-04-25 02:19:43 +02:00
Dark Web Informer ec14ba8eb3 Fixed destination channel selection 2026-02-19 21:42:29 +00:00
Dark Web Informer f118e50940 Update with combined scraping and forwarding 2026-01-30 16:29:31 +00:00
Dark Web Informer 9082136d6e Added Channel ID info when using Copy message 2026-01-26 21:05:49 +00:00
Dark Web Informer b5bf63e1e1 Event handling fix 2026-01-26 17:46:23 +00:00
Dark Web Informer b9ca6ce634 New Telegram Scraper Script with Copy/Forwarding 2026-01-26 17:14:58 +00:00