mirror of
https://github.com/hacdias/webdav.git
synced 2024-04-21 12:32:06 +00:00
fix: numeric passwords (#24)
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/hacdias/webdav/webdav"
|
||||
@@ -81,6 +82,10 @@ func parseUsers(raw []interface{}, c *webdav.Config) {
|
||||
password, ok := u["password"].(string)
|
||||
if !ok {
|
||||
password = ""
|
||||
|
||||
if numPwd, ok := u["password"].(int); ok {
|
||||
password = strconv.Itoa(numPwd)
|
||||
}
|
||||
}
|
||||
|
||||
if strings.HasPrefix(password, "{env}") {
|
||||
|
||||
Reference in New Issue
Block a user