mirror of
				https://github.com/optim-enterprises-bv/Mailu.git
				synced 2025-10-31 01:57:59 +00:00 
			
		
		
		
	Don't check empty passwords against HIBP
(cherry picked from commit f1c5ac5b14)
			
			
This commit is contained in:
		 Florent Daigniere
					Florent Daigniere
				
			
				
					committed by
					
						 Mergify
						Mergify
					
				
			
			
				
	
			
			
			 Mergify
						Mergify
					
				
			
						parent
						
							cfae470cbb
						
					
				
				
					commit
					1805ef4480
				
			| @@ -21,6 +21,9 @@ function sha1(string) { | |||||||
| } | } | ||||||
|  |  | ||||||
| function hibpCheck(pwd) { | function hibpCheck(pwd) { | ||||||
|  |     if (pwd === null || pwd === undefined || pwd.length === 0) { | ||||||
|  | 	    return; | ||||||
|  |     } | ||||||
|     // We hash the pwd first |     // We hash the pwd first | ||||||
|     sha1(pwd).then(function(hash){ |     sha1(pwd).then(function(hash){ | ||||||
|         // We send the first 5 chars of the hash to hibp's API |         // We send the first 5 chars of the hash to hibp's API | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								towncrier/newsfragments/3650.bugfix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								towncrier/newsfragments/3650.bugfix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | Don't check empty passwords against HIBP | ||||||
		Reference in New Issue
	
	Block a user