prevent leaking usernames, resolves #3 #5
					 1 changed files with 3 additions and 6 deletions
				
			
		
							
								
								
									
										7
									
								
								auth.py
									
										
									
									
									
								
							
							
						
						
									
										7
									
								
								auth.py
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -47,11 +47,8 @@ if __name__ == "__main__":
 | 
			
		|||
        write_pwdb(pwdb, PWDB_PATH)
 | 
			
		||||
    else:
 | 
			
		||||
        username, password = get_credentials()
 | 
			
		||||
        if username not in pwdb:
 | 
			
		||||
            print('Wrong username!')
 | 
			
		||||
        if username not in pwdb or not authenticate(username, password, pwdb):
 | 
			
		||||
            print('Wrong credentials (username or password)!')
 | 
			
		||||
        else:
 | 
			
		||||
            if authenticate(username, password, pwdb):
 | 
			
		||||
            print('Successfully authenticated!')
 | 
			
		||||
            else:
 | 
			
		||||
                print('Wrong password!')
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue