From 5f09414f85edfa60ab54ce8b9f8b03874e0670dc Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Tue, 3 Jan 2012 00:55:42 +0300 Subject: deprecate ActiveSupport::Base64 extend and define ::Base64 if needed --- activesupport/lib/active_support/message_verifier.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib/active_support/message_verifier.rb') diff --git a/activesupport/lib/active_support/message_verifier.rb b/activesupport/lib/active_support/message_verifier.rb index 9d7c81142a..bbb239e194 100644 --- a/activesupport/lib/active_support/message_verifier.rb +++ b/activesupport/lib/active_support/message_verifier.rb @@ -1,4 +1,4 @@ -require 'active_support/base64' +require 'base64' require 'active_support/core_ext/object/blank' module ActiveSupport @@ -42,14 +42,14 @@ module ActiveSupport data, digest = signed_message.split("--") if data.present? && digest.present? && secure_compare(digest, generate_digest(data)) - @serializer.load(ActiveSupport::Base64.decode64(data)) + @serializer.load(::Base64.decode64(data)) else raise InvalidSignature end end def generate(value) - data = ActiveSupport::Base64.encode64s(@serializer.dump(value)) + data = ::Base64.strict_encode64(@serializer.dump(value)) "#{data}--#{generate_digest(data)}" end -- cgit v1.2.3