[Security] /browse und /move ohne Pfad-Sandboxing #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probleme
a)
/browse—server.py:201-214Keine Whitelist. Authentifizierter User kann
/etc,/root, fremde Home-Verzeichnisse listen.b)
/move—server.py:339-359Kein tempdir-Check. Im Gegensatz zu
/downloadund/preview(in #1 gefixt) fehlt hier die Sandbox.Fix
Fuer
/move: gleicher tempdir-Check wie in/download.Fix umgesetzt in
server.py:BROWSE_ROOT = "/home/vchuser"als Sandbox/browselehnt Pfade ausserhalb mit 403 ab,parentistNonean der Wurzel/moveprueft jetzttempfile.gettempdir()-Praefix (analog/download), 403 bei MismatchManueller Test:
/etcund/root-> 403;/home/vchuser,/home/vchuser/projects-> 200;/movemit folder=/home/vchuser-> 403.