Compare commits
2 Commits
1a99b55dbb
...
2d2668c92c
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d2668c92c | |||
| adfe2e7809 |
4
.vscode/setting.json
vendored
Normal file
4
.vscode/setting.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"flake8.args": ["--max-line-length=140"],
|
||||
"python.linting.flake8Args": ["--config","flake8.cfg"]
|
||||
}
|
||||
@@ -47,12 +47,13 @@ class DummySha256Authorizer(DummyAuthorizer):
|
||||
)
|
||||
|
||||
for ftpuser, user_hash, virtpath, perm in cur.fetchall():
|
||||
self.add_user(ftpuser, user_hash, virtpath, perm)
|
||||
# Create the user's directory if it does not exist.
|
||||
try:
|
||||
Path(cfg.virtpath + ftpuser).mkdir(parents=True, exist_ok=True)
|
||||
self.add_user(ftpuser, user_hash, virtpath, perm)
|
||||
except Exception as e: # pylint: disable=broad-except
|
||||
self.responde(f"551 Error in create virtual user path: {e}")
|
||||
|
||||
|
||||
def validate_authentication(
|
||||
self: object, username: str, password: str, handler: object
|
||||
|
||||
Reference in New Issue
Block a user