Commit graph

5 commits

Author SHA1 Message Date
John Mizerek
5cde8ce4fa ZIP upload: add file sanitization, direct file read, and temp cleanup
- uploadSavedPage.cfm: sanitize extracted files (whitelist safe extensions,
  delete symlinks) to protect against malicious content from infected sites
- analyzeMenuUrl.cfm: detect local temp URLs and read directly from disk,
  bypassing Playwright for faster processing of saved pages
- saveWizard.cfm: delete temp folder immediately after wizard completes
  instead of waiting for 1-hour auto-cleanup
- setup-wizard.html: track temp folder ID and pass to saveWizard for cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 08:02:41 -08:00
John Mizerek
336aef8685 Fix HTTPS detection and file permissions for ZIP upload
- Check X-Forwarded-Proto header for HTTPS (reverse proxy)
- chmod extracted files to be world-readable for Playwright

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 07:43:28 -08:00
John Mizerek
ddaac523bf Add auto-cleanup of old temp extractions (>1 hour)
Security: Also added nginx rule on dev server to block CFM/PHP
execution in /temp/menu-import/ directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 07:40:10 -08:00
John Mizerek
093a3b8bce Fix struct-to-string comparison in uploadSavedPage.cfm
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 07:37:19 -08:00
John Mizerek
8aeca335fd Add ZIP upload for saved webpage import
For Cloudflare-protected sites, users can now:
1. Save the page from their browser (Webpage, Complete)
2. ZIP the HTML and assets folder
3. Upload the ZIP in the wizard
4. Server extracts to temp folder, Playwright scans local copy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 07:02:51 -08:00