mirror of
https://github.com/9001/copyparty.git
synced 2026-08-13 13:53:06 -06:00
ftp: fix GHSA-phv8-wgjp-g4p9 (stou)
This commit is contained in:
parent
c122e103bd
commit
b331bb1c8c
|
|
@ -483,6 +483,10 @@ class FtpFs(AbstractedFS):
|
||||||
def get_group_by_uid(self, gid: int) -> str:
|
def get_group_by_uid(self, gid: int) -> str:
|
||||||
return "root"
|
return "root"
|
||||||
|
|
||||||
|
def mkstemp(self, *a, **ka):
|
||||||
|
self.log("mkstemp%r @%s" % (a, self.uname))
|
||||||
|
raise FSE("nope")
|
||||||
|
|
||||||
|
|
||||||
class FtpHandler(FTPHandler):
|
class FtpHandler(FTPHandler):
|
||||||
abstracted_fs = FtpFs
|
abstracted_fs = FtpFs
|
||||||
|
|
@ -518,6 +522,9 @@ class FtpHandler(FTPHandler):
|
||||||
# reduce non-debug logging
|
# reduce non-debug logging
|
||||||
self.log_cmds_list = [x for x in self.log_cmds_list if x not in ("CWD", "XCWD")]
|
self.log_cmds_list = [x for x in self.log_cmds_list if x not in ("CWD", "XCWD")]
|
||||||
|
|
||||||
|
def ftp_STOU(self, *a) -> None:
|
||||||
|
self.respond("550 nope", logging.warning)
|
||||||
|
|
||||||
def ftp_STOR(self, file: str, mode: str = "w") -> Any:
|
def ftp_STOR(self, file: str, mode: str = "w") -> Any:
|
||||||
# Optional[str]
|
# Optional[str]
|
||||||
vp = join(self.fs.cwd, file).lstrip("/")
|
vp = join(self.fs.cwd, file).lstrip("/")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue