在迁移到rails 5之前,它运行得很好,但是当我迁移到rails 5.1.1时,它给我的错误如下
ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature
我使用的密钥与我们以前版本的rails中使用的密钥相同。
例如。
crypt = ActiveSupport::MessageEncryptor.new(Rails.configuration.secret_key_base)执行下一行后,我将得到上述错误。
@password = crypt.decrypt_and_verify(User.last.encryptedpass)发布于 2017-11-03 13:43:25
User.last.encryptedpass (User.last.encrypted_password):您是在使用devise on加密方法吗?
如果消息没有使用相同的秘密签名或未使用Base64 64编码,则引发InvalidSignature。
http://api.rubyonrails.org/v5.1/classes/ActiveSupport/MessageVerifier.html
发布于 2021-04-18 22:08:54
在我的例子中,我将undefined (字符串)发送到video字段(ActiveStorage)
发布于 2021-06-06 17:50:14
在我的例子中,我使用了附件的名称
has_one_attached :report实体中已经使用过的(作为表列名)
https://stackoverflow.com/questions/47096688
复制相似问题