mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	#2695: Do case-insensitive check for algorithms.
This commit is contained in:
		
							parent
							
								
									83ea2a92d4
								
							
						
					
					
						commit
						8d66dcd0f4
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -976,6 +976,8 @@ def get_authorization(self, req, chal): | |||
|         return base | ||||
| 
 | ||||
|     def get_algorithm_impls(self, algorithm): | ||||
|         # algorithm should be case-insensitive according to RFC2617 | ||||
|         algorithm = algorithm.upper() | ||||
|         # lambdas assume digest modules are imported at the top level | ||||
|         if algorithm == 'MD5': | ||||
|             H = lambda x: hashlib.md5(x).hexdigest() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Georg Brandl
						Georg Brandl