mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-09 16:25:15 +03:00
scripts: add support for converting users from other users stores
currently we support: - Linux/Unix users stored in shadow/passwd files - Pure-FTPd virtual users generated using `pure-pw` CLI - ProFTPD users generated using `ftpasswd` CLI
This commit is contained in:
@@ -410,6 +410,9 @@ func validateUser(user *User) error {
|
||||
}
|
||||
user.Password = pwd
|
||||
}
|
||||
if len(user.PublicKeys) == 0 {
|
||||
user.PublicKeys = []string{}
|
||||
}
|
||||
for i, k := range user.PublicKeys {
|
||||
_, _, _, _, err := ssh.ParseAuthorizedKey([]byte(k))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user