mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 01:10:10 +00:00
fix(security): allow Firefox ..files directories in path validation
Fixes #263 - Change regex from \.\. to (^|/)\.\.(/|$) to only match path components - Firefox uses ..files suffix in IndexedDB dirs (e.g., name..files) - Still blocks actual traversal: /tmp/../etc - Added test cases for Firefox compatibility - All 16 tests passing
This commit is contained in:
@@ -291,7 +291,7 @@ bats tests/security.bats # Run specific suite
|
||||
| Standard | Implementation |
|
||||
|----------|----------------|
|
||||
| OWASP Secure Coding | Input validation, least privilege, defense-in-depth |
|
||||
| CWE-22 (Path Traversal) | Absolute path enforcement, `../` rejection |
|
||||
| CWE-22 (Path Traversal) | Enhanced detection: rejects `/../` components while allowing `..` in directory names (Firefox compatibility) |
|
||||
| CWE-78 (Command Injection) | Control character filtering |
|
||||
| CWE-59 (Link Following) | Symlink detection before privileged operations |
|
||||
| Apple File System Guidelines | Respects SIP, Read-Only Volumes, TCC |
|
||||
|
||||
Reference in New Issue
Block a user