#1382 ✓not-applicable
handler

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

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 »

Pages