reject anon ftp if anon has no read/write

This commit is contained in:
ed 2022-09-20 21:40:21 +02:00
parent f5474d34ac
commit 75a58b435d

View file

@ -56,7 +56,9 @@ class FtpAuth(DummyAuthorizer):
handler.username = uname
if password and not uname:
if (password and not uname) or not (
asrv.vfs.aread.get(uname) or asrv.vfs.awrite.get(uname)
):
raise AuthenticationFailed("Authentication failed.")
def get_home_dir(self, username: str) -> str: