mirror of
				https://github.com/pgadmin-org/pgadmin4.git
				synced 2025-02-25 18:55:31 -06:00 
			
		
		
		
	Fix password encryption with non-alpha passwords. Fixes #1371
This commit is contained in:
		
				
					committed by
					
						
						Dave Page
					
				
			
			
				
	
			
			
			
						parent
						
							5f3511ce39
						
					
				
				
					commit
					c702ef9c48
				
			@@ -48,9 +48,8 @@ def decrypt(ciphertext, key):
 | 
			
		||||
    iv = ciphertext[:AES.block_size]
 | 
			
		||||
    cipher = AES.new(pad(key), AES.MODE_CFB, iv)
 | 
			
		||||
    decrypted = cipher.decrypt(ciphertext[AES.block_size:])
 | 
			
		||||
    l = decrypted.count(padding_string)
 | 
			
		||||
 | 
			
		||||
    return decrypted[:len(decrypted)-l]
 | 
			
		||||
    return decrypted
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def pad(str):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user