Skip to content

Commit 627d63d

Browse files
committed
Fix password_length for new generated templates and default due to bcrypt gem work
1 parent c51da69 commit 627d63d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/devise.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ module Test
117117

118118
# Range validation for password length
119119
mattr_accessor :password_length
120-
@@password_length = 6..128
120+
@@password_length = 6..72 # max 72 byte for bcrypt
121121

122122
# The time the user will be remembered without asking for credentials again.
123123
mattr_accessor :remember_for

lib/generators/templates/devise.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@
180180
# config.rememberable_options = {}
181181

182182
# ==> Configuration for :validatable
183-
# Range for password length.
184-
config.password_length = 6..128
183+
# Range for password length. 72 bytes max for bcrypt
184+
config.password_length = 6..72
185185

186186
# Email regex used to validate email formats. It simply asserts that
187187
# one (and only one) @ exists in the given string. This is mainly

0 commit comments

Comments
 (0)