Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update A2 Password Complexity Documentation #311

Open
nvisium-john-poulin opened this issue Feb 21, 2018 · 1 comment
Open

Update A2 Password Complexity Documentation #311

nvisium-john-poulin opened this issue Feb 21, 2018 · 1 comment

Comments

@nvisium-john-poulin
Copy link
Contributor

There are several issues with this documentation.

  1. The documented solution and bug still uses hash rocket syntax, which causes errors on Rails 5.1. I found a working solution with the following:
  validates :password, presence: true,
                       confirmation: true,
                       length: {within: 6..40},
                       format: { with: /\A.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\@\#\$\%\^\&\+\=]).*\z/, message: "password policy" },
                       on: :create,
                       if: :password
  1. After implementing the password policy, unit tests were failing because the database couldn't seed properly. We should add a note to the documentation that users will need to change the seed passwords or we can just use a "more secure" password by default, such as Citrusblend2@
@gopye
Copy link

gopye commented Oct 1, 2019

I also ran into the second issue brought up by @nvisium-john-poulin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants