From cadb533595a68ff116d2e4a8184d93d9a7ebcc3d Mon Sep 17 00:00:00 2001 From: Alex OvsInc <83650584+ovsinc@users.noreply.github.com> Date: Wed, 21 Jun 2023 18:20:23 +0300 Subject: [PATCH] fix: unsafe verification username in CheckUsername (#2006) * Customization of the initialization file * Unsafe verification username in CheckUsername --- object/check.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/object/check.go b/object/check.go index fe258bc8..17341af5 100644 --- a/object/check.go +++ b/object/check.go @@ -396,11 +396,6 @@ func CheckUsername(username string, lang string) string { return i18n.Translate(lang, "check:Username is too long (maximum is 39 characters).") } - exclude, _ := regexp.Compile("^[\u0021-\u007E]+$") - if !exclude.MatchString(username) { - return "" - } - // https://stackoverflow.com/questions/58726546/github-username-convention-using-regex re, _ := regexp.Compile("^[a-zA-Z0-9]+((?:-[a-zA-Z0-9]+)|(?:_[a-zA-Z0-9]+))*$") if !re.MatchString(username) {