mirror of
				https://github.com/cmur2/dyndnsd.git
				synced 2025-10-31 00:25:06 +01:00 
			
		
		
		
	auth: fix broken password check
Guessing an existing user's name was enough to successfully authenticate.
This commit is contained in:
		| @@ -201,7 +201,7 @@ module Dyndnsd | ||||
|       # configure rack | ||||
|       app = Daemon.new(config, db, updater, responder) | ||||
|       app = Rack::Auth::Basic.new(app, "DynDNS") do |user,pass| | ||||
|         allow = (config['users'].has_key? user) and (config['users'][user]['password'] == pass) | ||||
|         allow = ((config['users'].has_key? user) and (config['users'][user]['password'] == pass)) | ||||
|         if not allow | ||||
|           Dyndnsd.logger.warn "Login failed for #{user}" | ||||
|           Metriks.meter('requests.auth_failed').mark | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 GitHub
						GitHub