bcrypt has a 72 character limit :'(
56 bytes limit of eksblowfish, to be exact
This commit is contained in:
@@ -13,7 +13,7 @@ class User < ActiveRecord::Base
|
||||
validates_presence_of :password, :password_confirmation, :email_token, on: :create
|
||||
validates_presence_of :name, :email, :ign
|
||||
|
||||
validates_length_of :password, in: 8..256, on: [:create, :update], allow_nil: true
|
||||
validates_length_of :password, in: 8..72, on: [:create, :update], allow_nil: true
|
||||
validates_length_of :name, in: 2..30
|
||||
validates_length_of :about, maximum: 5000
|
||||
validates_length_of :ign, minimum: 1, maximum: 16
|
||||
|
||||
@@ -10,7 +10,7 @@ Role.create!([
|
||||
{name: "superadmin", value: 500, color: "#d22"}
|
||||
])
|
||||
|
||||
userpw = SecureRandom.hex(64)
|
||||
userpw = SecureRandom.hex(36)
|
||||
|
||||
|
||||
# fallback profile for deleted users
|
||||
|
||||
Reference in New Issue
Block a user