[Modify] Add a check for the header name
It must be a token.
This commit is contained in:
		@@ -471,6 +471,11 @@ namespace WebSocketSharp.Net
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      var name = headerField.Substring (0, colon).Trim ();
 | 
			
		||||
      if (name.Length == 0 || !name.IsToken ()) {
 | 
			
		||||
        _context.ErrorMessage = "Invalid header name";
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      var val = colon < headerField.Length - 1
 | 
			
		||||
                ? headerField.Substring (colon + 1).Trim ()
 | 
			
		||||
                : String.Empty;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user