This project is archived and is in readonly mode.

#3333 ✓stale
Jeffrey Hardy

MessageVerifier#verify should raise InvalidSignature when the signature is blank

Reported by Jeffrey Hardy | October 5th, 2009 @ 02:10 PM

This patch modifies MessageVerifier#verify to raise InvalidSignature when the given signature is blank.

Before this patch:

>> ActiveSupport::MessageVerifier.new("secret").verify("")
TypeError: can't convert nil into String

After this patch:

>> ActiveSupport::MessageVerifier.new("secret").verify("")
ActiveSupport::MessageVerifier::InvalidSignature

Patched for master and 2-3.stable.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages