Designing a WAF-Safe Web File Manager and Temporary SFTP Auth Flow
Web Application Firewalls (WAFs) protect public origins from SQL injection and XSS payloads, but developer file managers frequently upload .sql, .sh, .env, and JavaScript files that resemble attack signatures.
The False-Positive Problem
Sending raw file paths like ../../config/database.sql or payloads containing SELECT * FROM over plain query parameters or unencoded JSON often triggers automated edge rules, breaking legitimate developer workflows.
Base64URL Path & Content Transport
In athars-file-manager (file.athars.eu), file paths are encoded with a URL-safe b64_ prefix, and text file saves support Base64 JSON transport:
- Predictable Decoding: Server handlers decode and normalize paths safely before invoking Wings file APIs.
- 100 MB Upload Ceiling: Aligned across Next.js
proxyClientMaxBodySize, upload routes, and edge proxy limits. - Scoped OAuth 2.0 + PKCE: Every file route validates session tokens and enforces
files:readorfiles:writescopes alongside strict container ownership checks.
Read more about browser editing and SFTP workflows on athars.eu/guides.