mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-05 00:10:49 +08:00 
			
		
		
		
	fix possible IndexOutOfRange bug (#979)
				
					
				
			This commit is contained in:
		
				
					committed by
					
						
						Thiago Loureiro
					
				
			
			
				
	
			
			
			
						parent
						
							647a21bb2d
						
					
				
				
					commit
					b32850a804
				
			@@ -24,7 +24,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            var splits = claimResponse.Data.Split(delimiter.ToCharArray());
 | 
					            var splits = claimResponse.Data.Split(delimiter.ToCharArray());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (splits.Length < index || index < 0)
 | 
					            if (splits.Length <= index || index < 0)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                return new ErrorResponse<string>(new CannotFindClaimError($"Cannot find claim for key: {key}, delimiter: {delimiter}, index: {index}"));
 | 
					                return new ErrorResponse<string>(new CannotFindClaimError($"Cannot find claim for key: {key}, delimiter: {delimiter}, index: {index}"));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user