diff --git a/app/models/user.rb b/app/models/user.rb index 39787e1..9d0ca4f 100755 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -4,7 +4,8 @@ class User < ActiveRecord::Base validates :password, :presence => true, :confirmation => true, :length => {:within => 6..40}, - :on => :create + :on => :create#, + #:format => {:with => /\A.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\@\#\$\%\^\&\+\=]).*\z/} validates_presence_of :email validates_uniqueness_of :email validates_format_of :email, :with => /.+@.+\..+/i diff --git a/app/views/layouts/tutorial/broken_auth_sess/_password_complexity.html.erb b/app/views/layouts/tutorial/broken_auth_sess/_password_complexity.html.erb new file mode 100644 index 0000000..ebb4cbb --- /dev/null +++ b/app/views/layouts/tutorial/broken_auth_sess/_password_complexity.html.erb @@ -0,0 +1,100 @@ +
diff --git a/app/views/tutorials/broken_auth.html.erb b/app/views/tutorials/broken_auth.html.erb index 52ee205..7d85147 100755 --- a/app/views/tutorials/broken_auth.html.erb +++ b/app/views/tutorials/broken_auth.html.erb @@ -5,6 +5,11 @@ <%= render :partial => ("layouts/tutorial/broken_auth_sess/user_pass_enum")%> +