
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
-
Frostbytten November 23rd, 2008 @ 09:24 PM
@@@ruby 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>=>...
Sorry, should have read the formatting help. *sigh*
-
Frostbytten November 25th, 2008 @ 11:13 PM
- Assigned user cleared.
Fixed on my github repo with help from namelessjon.
(git://github.com/frostbytten/dm-more.git)
-
Dan Kubb (dkubb) November 25th, 2008 @ 11:31 PM
- State changed from new to resolved
I have pushed this to dm-more:
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.
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
- Nobody is watching this ticket.