lib/vault-tools/web.rb in vault-tools-0.6.1 vs lib/vault-tools/web.rb in vault-tools-0.6.2

- old
+ new

@@ -86,14 +86,10 @@ # Check request for HTTP Basic creds and # password matches settings.basic_password def authorized?(passwords) if passwords.empty? - if settings.basic_password.is_a?(String) - passwords << settings.basic_password - else - passwords = passwords + settings.basic_password - end + passwords = passwords + Array(settings.basic_password) end passwords << settings.basic_password if passwords.empty? @auth ||= Rack::Auth::Basic::Request.new(request.env) @auth.provided? && @auth.basic? && @auth.credentials && passwords.include?(@auth.credentials[1])