Skip to content

Update A2 Password Complexity Documentation #311

Open
@nvisium-john-poulin

Description

@nvisium-john-poulin

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@

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions