fix: numeric passwords (#24)

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias
2019-06-09 13:51:53 +01:00
committed by GitHub
parent d266f1150e
commit 764a69cd33
+5
View File
@@ -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}") {