Skip to content

Commit

Permalink
redundant comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
knzconnor authored and Luke Melia committed May 30, 2010
1 parent 8f7404d commit 870686f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rack/bug/params_signature.rb
Expand Up @@ -36,9 +36,7 @@ def secret_key_blank?
def validate!
if secret_key_blank?
raise SecurityError.new("Missing secret key")
end

if secret_key_blank? || request.params["hash"] != signature(request.params)
elsif request.params["hash"] != signature(request.params)
raise SecurityError.new("Invalid query hash.")
end
end
Expand Down

0 comments on commit 870686f

Please sign in to comment.