app/controllers/ahoy/messages_controller.rb in ahoy_email-0.3.0 vs app/controllers/ahoy/messages_controller.rb in ahoy_email-0.3.1
- old
+ new
@@ -18,10 +18,10 @@
@message.save!
end
url = params[:url].to_s
signature = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("sha1"), AhoyEmail.secret_token, url)
publish :click, url: params[:url]
- if secure_compare(params[:signature], signature)
+ if secure_compare(params[:signature].to_s, signature)
redirect_to url
else
redirect_to main_app.root_url
end
end