diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-02-17 15:00:06 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-02-17 15:00:06 +0100 |
| commit | 48263078b46aa4ef46c0fb6944665b2c317bf077 (patch) | |
| tree | beaf901c571ed2bdf475870c337144561b6540cf /Jellyfin.Server.Implementations/Users/UserManager.cs | |
| parent | df8346cd634dbd9e8cc26c121c406b272bc9a57f (diff) | |
Reduce string allocations by regex
Diffstat (limited to 'Jellyfin.Server.Implementations/Users/UserManager.cs')
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/UserManager.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index 92384986a..c4756433e 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -740,7 +740,7 @@ namespace Jellyfin.Server.Implementations.Users throw new ArgumentException("Usernames can contain unicode symbols, numbers (0-9), dashes (-), underscores (_), apostrophes ('), and periods (.)", nameof(name)); } - private static bool IsValidUsername(string name) + private static bool IsValidUsername(ReadOnlySpan<char> name) { // This is some regex that matches only on unicode "word" characters, as well as -, _ and @ // In theory this will cut out most if not all 'control' characters which should help minimize any weirdness |
