Commit Graph
9 Commits
Author SHA1 Message Date
Daniel Hiller bd487e3f9f fix: Prevent path traversal in local file manager
The local file manager joined attacker-controlled path segments into the
uploads storage path without ensuring the result stayed under the uploads
root. Any authenticated user could read arbitrary files readable by the
Planka process (e.g. /etc/passwd, /app/.env) via `../` sequences on the
/user-avatars/*, /background-images/* and /favicons/* routes (CWE-22).

Resolve the path and enforce it stays within uploadsBasePath, centrally in
buildPath so every local file operation is covered. Additionally resolve
symlinks in read() and re-check containment, so a symlink inside the root
cannot be used to escape it.

Reported by Alpesh (github.com/Alpastx).
2026-08-10 03:00:29 +02:00
Maksim Eltyshev 450bd875c1 chore: Update server dependencies 2026-02-04 12:53:15 +01:00
Maksim Eltyshev 8df5a111bf fix: Forward headers correctly when reading from S3 2026-02-04 11:34:47 +01:00
Maksim Eltyshev db99227f32 feat: Re-stream static files from S3, introduce protected static files 2026-01-30 21:45:18 +01:00
Maksim Eltyshev 208e61a272 feat: Optimize and parallel image processing 2025-12-19 19:11:02 +01:00
Maksim Eltyshev 4d77a1f596 feat: Track storage usage 2025-08-23 00:03:20 +02:00
Maksim Eltyshev 2ee1166747 feat: Version 2
Closes #627, closes #1047
2025-05-10 02:09:06 +02:00
Maksim Eltyshev be9dd30cd1 ref: Rename folder to dir for consistency 2024-11-12 17:07:04 +01:00
Maksim Eltyshev 97f4c0ab0d fix: Secure S3 attachments, bump SDK, refactoring
Closes #673
2024-11-12 15:58:22 +01:00