Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Devise extension to prevent users from using a common password.

License

NotificationsYou must be signed in to change notification settings

datacamp-engineering/devise-uncommon_password

 
 

Repository files navigation

Build StatusCode Climate

Devise::UncommonPassword is an extension for thedevise gem, which prevents users from signing up using one of the 1000 most common passwords. The list is derived from:https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10-million-password-list-top-100000.txt.

Usage

Add the:uncommon_password module to your model:

classAdminUser <ApplicationRecorddevise:database_authenticatable,:recoverable,:rememberable,:trackable,:validatable,:uncommon_passwordend

By default, the password is checked against the 1000 most common passwords that fit within the minimum and maximum lengths specified in the /config/initializers/devise.rb file. However, if a developer wants to check against a smaller list, they may override this default by adding the following line to that same file:

# Number of common passwords to check entered password against.config.password_matches=100

Internationalization and Customization

The default message for users who attempt to use a common password is:

is a very common password. Please choose something harder to guess.

This can be changed by modifying thedevise.en.yml file, under errors/messages/common_password. Translations can be provided using the devise translation files in the same location.

en:errors:messages:common_password:'is a very common password. Please choose something harder to guess.'

Installation

Add this line to your application's Gemfile:

gem'devise-uncommon_password'

And then execute:

$ bundle install

Contributing

You can contribute by doing the following:

  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork it
  • Write your changes
  • Test
  • Commit
  • Send a pull request

License

The gem is available as open source under the terms of theMIT License.

About

Devise extension to prevent users from using a common password.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript88.2%
  • Ruby7.6%
  • CSS3.2%
  • HTML1.0%

[8]ページ先頭

©2009-2025 Movatter.jp