Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Marshal.decrypt: return nil if base64 decoding failed.

  • Loading branch information...
commit 6ebe16f7589d89643de71cae9d78e7b641b1bd8c 1 parent 7e2320b
@FooBarWidget authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/auto_redirection/encryption.rb
View
3  lib/auto_redirection/encryption.rb
@@ -64,6 +64,9 @@ def self.decrypt(data, ascii7 = true)
end
if ascii7
data = decode_base64_url(data)
+ if data.nil? || data.empty?
+ return nil
+ end
end
decrypted_data = aes(:decrypt, AutoRedirection.encryption_key, data)
if decrypted_data.size < SIGNATURE_SIZE
Please sign in to comment.
Something went wrong with that request. Please try again.