X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=passwd.go;fp=passwd.go;h=852192f8b7ea898cb54d7ea3a4e912f884e13bc9;hb=b144ad5b2dd5d62dd14909afd6696b3137bdf0db;hp=b13a342c92835a25dfc67f968dc956dfb54ae3d1;hpb=c576240f769376cce57823e24158ab4bdaae324c;p=gocheese.git diff --git a/passwd.go b/passwd.go index b13a342..852192f 100644 --- a/passwd.go +++ b/passwd.go @@ -31,6 +31,9 @@ func refreshPasswd() { } passwordsNew := make(map[string]Auther) for i, credentials := range strings.Split(strings.TrimRight(string(passwd), "\n"), "\n") { + if len(credentials) == 0 || strings.HasPrefix(credentials, "#") { + continue + } splitted := strings.Split(credentials, ":") if len(splitted) != 2 { log.Fatalf("%s:%d: Wrong login:password format", *passwdPath, i)