mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
web user templates: ensure we can save valid users
users with no public key and password are now valid after the recent changes Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -705,7 +705,7 @@ func getUsersForTemplate(r *http.Request) []userTemplateFields {
|
||||
if len(tplPublicKeys) > idx {
|
||||
publicKey = strings.TrimSpace(tplPublicKeys[idx])
|
||||
}
|
||||
if username == "" || (password == "" && publicKey == "") {
|
||||
if username == "" {
|
||||
continue
|
||||
}
|
||||
if _, ok := users[username]; ok {
|
||||
|
||||
Reference in New Issue
Block a user