#668 ✓resolved
Frostbytten

BCryptHash equality problem

Reported by Frostbytten | November 23rd, 2008 @ 09:22 PM

Test Application

class Test property :id, Serial property :hash, BCryptHash end

Test.auto_migrate! @a = Test.new(:hash => 'hi') @a.save @a = nil @a = Test.first @a.dirty_attributes => {#<Property:Test:hash>=>...

Problem

When Resource runs through dirty_attributes it tries to match equality for a BCryptHash. This is impossible outside of a BCrypt::Password.new(old_value).to_s == BCrypt::Password.new(BCrypt::Password.create(new_value).to_s type situation.

Solution

?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

People watching this ticket

Pages