openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit cfe5b8d77c1fd96519438af741227e4bdbfd9b53
parent 5a237f7d817fa0503ba2f28d5369bb9fddfa11a4
Author: Peter Kosyh <p.kosyh@gmail.com>
Date:   Sun,  6 Sep 2020 20:54:21 +0300

do not allow / in usernames

Diffstat:
Mii/db.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ii/db.go b/ii/db.go @@ -661,7 +661,7 @@ type UDB struct { } func IsUsername(u string) bool { - return !strings.ContainsAny(u, ":\n\r\t") && + return !strings.ContainsAny(u, ":\n\r\t/") && !strings.HasPrefix(u, " ") && !strings.HasSuffix(u, " ") && len(u) <= 16 && len(u) > 2