added prefix scan and fixed logout issue
This commit is contained in:
parent
4812a60367
commit
8143e484cd
12 changed files with 99 additions and 77 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue