mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Update ThrowIfInvalidUsername to include whitespaces.
This commit is contained in:
		
							parent
							
								
									2db0750abb
								
							
						
					
					
						commit
						a0ab0eb875
					
				@ -735,7 +735,7 @@ namespace Jellyfin.Server.Implementations.Users
 | 
			
		||||
 | 
			
		||||
        internal static void ThrowIfInvalidUsername(string name)
 | 
			
		||||
        {
 | 
			
		||||
            if (!string.IsNullOrWhiteSpace(name) && ValidUsernameRegex().IsMatch(name))
 | 
			
		||||
            if (!string.IsNullOrWhiteSpace(name) && ValidUsernameRegex().IsMatch(name) && !char.IsWhiteSpace(name[0]) && !char.IsWhiteSpace(name[^1]))
 | 
			
		||||
            {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user