added prefix scan and fixed logout issue

This commit is contained in:
ston1th 2019-07-06 11:31:12 +02:00
commit 8143e484cd
12 changed files with 99 additions and 77 deletions

View file

@ -20,14 +20,6 @@ var reservedNames = []string{
"view",
}
// Parts taken from strings.TrimPrefix
func hasTrimPrefix(s, prefix string) (string, bool) {
if len(s) >= len(prefix) && s[0:len(prefix)] == prefix {
return s[len(prefix):], true
}
return s, false
}
func validatePassword(pw string) (b []byte) {
b = []byte(pw)
if len(pw) <= 56 {