File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ import (
30
30
"code.gitea.io/gitea/modules/timeutil"
31
31
"code.gitea.io/gitea/modules/util"
32
32
"code.gitea.io/gitea/modules/validation"
33
+
33
34
"golang.org/x/text/runes"
34
35
"golang.org/x/text/transform"
35
36
"golang.org/x/text/unicode/norm"
36
-
37
37
"xorm.io/builder"
38
38
)
39
39
@@ -522,9 +522,11 @@ func GetUserSalt() (string, error) {
522
522
523
523
// Developer warning: The set of characters here can safely expand without a breaking change,
524
524
// but characters removed from this set can cause user account linking to break
525
- var invalidUsernameCharsRE = regexp .MustCompile (`[^\w-.]` )
526
- var removeDiacriticsTransform = transform .Chain (norm .NFD , runes .Remove (runes .In (unicode .Mn )), norm .NFC )
527
- var removeChars = strings .NewReplacer ("'" , "" )
525
+ var (
526
+ invalidUsernameCharsRE = regexp .MustCompile (`[^\w-.]` )
527
+ removeDiacriticsTransform = transform .Chain (norm .NFD , runes .Remove (runes .In (unicode .Mn )), norm .NFC )
528
+ removeChars = strings .NewReplacer ("'" , "" , "`" , "" )
529
+ )
528
530
529
531
// normalizeUserName returns a string with single-quotes and diacritics
530
532
// removed, and any other non-supported username characters replaced with
You can’t perform that action at this time.
0 commit comments