nosub should prevent mkdir

This commit is contained in:
ed 2025-07-28 23:08:41 +00:00 committed by luzpaz
parent 205755d55f
commit deeb1ff091

View file

@ -3026,6 +3026,9 @@ class HttpCli(object):
self.gctx = vpath
vpath = undot(vpath)
vfs, rem = self.asrv.vfs.get(vpath, self.uname, False, True)
if "nosub" in vfs.flags:
raise Pebkac(403, "mkdir is forbidden below this folder")
rem = sanitize_vpath(rem, "/")
fn = vfs.canonical(rem)