Commit Graph

6 Commits

Author SHA1 Message Date
Todd
7c87fc1ff4 Fix Instagram detection and notification filter bugs
- Update browser fingerprint from Edge 101 to Chrome 136 with Edge/macOS headers
- Add missing headers: X-CSRFToken, X-IG-WWW-Claim, X-ASBD-ID
- Reduce page size from 33 to 12 (matches real browser behavior)
- Add randomized delays between requests and between creators (8-15s cooldown)
- Update X-IG-WWW-Claim dynamically from response headers
- Fix notification tagged-user filter using wrong column names (p.created_at, a.updated_at don't exist), now uses a.downloaded_at

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 13:28:21 -04:00
Todd
c5781197cc Fix Instagram authenticated API cookie loading and status reporting
- Handle both cookie formats: flat array and {"cookies": [...]} object
  (scrapers page saves the latter, code only accepted the former)
- Update scraper status to 'ok' after successful authenticated API call
  (previously only set to 'failed' on 401, never cleared on success)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 08:41:42 -04:00
Todd
49e72207bf Encrypt file paths in API URLs using Fernet tokens
Raw filesystem paths were exposed in browser URLs, dev tools, and proxy logs.
Now all file-serving endpoints accept an opaque encrypted token (t= param)
derived from the session secret via HKDF, with a 4-hour TTL.

Backend:
- Add core/path_tokens.py with Fernet encrypt/decrypt (HKDF from .session_secret)
- Add file_token to all list/gallery/feed/search responses across 7 routers
- Accept optional t= param on all file-serving endpoints (backward compatible)

Frontend:
- Update 4 URL helpers in api.ts to prefer token when available
- Add 4 new helpers for paid-content/embedded-metadata URLs
- Update all 14 page/component files to pass file_token to URL builders
- Add file_token to all relevant TypeScript interfaces

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 08:25:22 -04:00
Todd
523f91788e Fix DB paths, add auth to sensitive endpoints, misc bug fixes
- scheduler.py: Use full path for scheduler_state.db instead of relative name
- recycle.py: Use full path for thumbnails.db instead of relative name
- cloud_backup.py, maintenance.py, stats.py: Require admin for config/cleanup/settings endpoints
- press.py: Add auth to press image serving endpoint
- private_gallery.py: Fix _create_pg_job call and add missing secrets import
- appearances.py: Use sync httpx instead of asyncio.run for background thread HTTP call

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 08:25:00 -04:00
Todd
7101c96b26 Remove secrets from tracking, update .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 22:43:12 -04:00
Todd
0d7b2b1aab Initial commit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 22:42:55 -04:00