
BCryptHash default length with PostGres on Heroku
Reported by handler | August 5th, 2010 @ 05:14 PM
i'm setting up an app on heroku
a property declared as:
property :password, BCryptHash, :length => (5..20)
causes a DataObjects::DataError (on Object.create(:password => "____"). i looked into the configuration of my PostGres table and it appears the column was set to have a max length of 50 (the BCryptHash field should have a max 60 chars)... once i got rid of the length requirement, the record creation worked.
having the length requirement on a BCryptHash does not cause any issues with the sqlite adapter
version info:
sqlite3 (0.0.8)
sqlite3-ruby (1.2.5)
dm-core (1.0.0)
dm-do-adapter (1.0.0)
dm-migrations (1.0.0)
dm-sqlite-adapter (1.0.0)
dm-types (1.0.0)
dm-validations (1.0.0)
do_sqlite3 (0.10.2)
Comments and changes to this ticket
-
Dan Kubb (dkubb) September 2nd, 2010 @ 01:11 PM
- State changed from new to unconfirmed
- Assigned user set to Piotr Solnica (solnic)
-
Piotr Solnica (solnic) November 1st, 2010 @ 01:39 PM
- State changed from unconfirmed to not-applicable
-
Piotr Solnica (solnic) November 1st, 2010 @ 01:39 PM
If you specify :length => 5..20 you also say that the column in the db will have length 20.
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 »