Validate argument lengths in crypto.js
These functions accept an array buffer and extract an AES and MAC key from it without verifying it has the appropriate length. Ciphertext messages are similarly dissected. The slice function does not raise an error on out of bounds accesses but instead returns an empty or partially-filled array. Empty or short arrays will be passed through to the window.crypto.subtle API, where they will raise an error. We should not rely on the Web Crypto API to validate key lengths or for MAC checks to fail. Instead, validate the lengths of given parameters before extracting their components. // FREEBIEpull/749/head
							parent
							
								
									cb93ad4cff
								
							
						
					
					
						commit
						ac7c95fed0
					
				
					Loading…
					
					
				
		Reference in New Issue