mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
warn when sharing certain system locations
This commit is contained in:
parent
db51f1b063
commit
2cca6e0922
|
@ -1581,6 +1581,12 @@ class AuthSrv(object):
|
|||
if t:
|
||||
self.log("\n\033[{}\033[0m\n".format(t))
|
||||
|
||||
zv, _ = vfs.get("/", "*", False, False)
|
||||
zs = zv.realpath.lower()
|
||||
if zs in ("/", "c:\\") or zs.startswith(r"c:\windows"):
|
||||
t = "you are sharing a system directory: {}\n"
|
||||
self.log(t.format(zv.realpath), c=1)
|
||||
|
||||
try:
|
||||
zv, _ = vfs.get("/", "*", False, True)
|
||||
if self.warn_anonwrite and os.getcwd() == zv.realpath:
|
||||
|
|
Loading…
Reference in a new issue