# Devise Uncommon Password
[![Build Status](https://travis-ci.org/HCLarsen/devise-uncommon_password.svg?branch=master)](https://travis-ci.org/HCLarsen/devise-uncommon_password)
[![Code Climate](https://codeclimate.com/github/HCLarsen/devise-uncommon_password.svg)](https://codeclimate.com/github/HCLarsen/devise-uncommon_password)
Devise::UncommonPassword is an extension for the [devise](https://github.com/heartcombo/devise) gem, which prevents users from signing up using one of the 100 most common passwords. The list is derived from the darkweb2017_top10K.txt found at: https://github.com/danielmiessler/SecLists/tree/master/Passwords.
## Usage
Add the `:uncommon_password` module to your model:
```ruby
class AdminUser < ApplicationRecord
devise :database_authenticatable,
:recoverable, :rememberable, :trackable, :validatable, :uncommon_password
end
```
By default, the password is checked against the 100 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 larger list, they may override this default by adding the following line to that same file:
```ruby
# Number of common passwords to check entered password against.
config.password_matches = 1000
```
### 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 the `devise.en.yml` file, under errors/messages/common_password. Translations can be provided using the devise translation files in the same location.
```yml
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:
```ruby
gem 'devise-uncommon_password'
```
And then execute:
```bash
$ 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 the [MIT License](http://opensource.org/licenses/MIT).
没有合适的资源?快使用搜索试试~ 我知道了~
设计扩展以防止用户使用通用密码。_JavaScript_Ruby.zip
共110个文件
rb:34个
js:12个
gz:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 96 浏览量
2023-04-06
22:20:18
上传
评论
收藏 299KB ZIP 举报
温馨提示
设计扩展以防止用户使用通用密码。_JavaScript_Ruby
资源推荐
资源详情
资源评论
收起资源包目录
设计扩展以防止用户使用通用密码。_JavaScript_Ruby.zip (110个子文件)
bundle 129B
trix-ac629f94e04ee467ab73298a3496a4dfa33ca26a132f624dd5475381bc27bdc8.css 16KB
application.css 736B
application-ce435edb8ebc41f2ee54d8bfc4e6da661daa1caa3dbd28bf9e7809ff963c755c.css 702B
application.html.erb 249B
mailer.html.erb 229B
mailer.text.erb 13B
Gemfile 637B
rails-7.0.gemfile 123B
rails-4.2.gemfile 101B
rails-6.0.gemfile 99B
rails-5.1.gemfile 99B
rails-5.2.gemfile 99B
rails-5.0.gemfile 99B
rails-6.1.gemfile 99B
devise-uncommon_password.gemspec 978B
.gitignore 314B
trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js.gz 59KB
actiontext-28c61f5197c204db043317a8f8826a87ab31495b741f854d307ca36122deefce.js.gz 6KB
activestorage-3ab61e47dd4ee2d79db525ade1dca2ede0ea2b7371fe587e408ee37b7ade265d.js.gz 6KB
activestorage.esm-01f58a45d77495cdfbdfcc872902a430426c4391634ec9c3da5f69fbf8418492.js.gz 6KB
application-8550e8e4eac1040eca5d54f5ce7f0bcc4c54c5189554124077cb8b8c2e6b4bc5.js.gz 4KB
cable-0a3b76e040acca4b722c81fdb5277b2bcf676e872baea2fc5cded4175091d9d2.js.gz 4KB
actioncable-5433453f9b6619a9de91aaab2d7fc7ff183e5260c0107cbc9a1aa0c838d9a74e.js.gz 4KB
trix-ac629f94e04ee467ab73298a3496a4dfa33ca26a132f624dd5475381bc27bdc8.css.gz 4KB
actioncable.esm-e01089c3ec4fe7817fa9abcad06cab6bdc387f95f0ca6aab4bf7ba7537f70690.js.gz 3KB
application-ce435edb8ebc41f2ee54d8bfc4e6da661daa1caa3dbd28bf9e7809ff963c755c.css.gz 391B
manifest-b84bfa46a33d7f0dc4d2e7b8889486c9a957a5e40713d58f54be71b66954a1ff.js.gz 24B
404.html 2KB
422.html 2KB
500.html 2KB
favicon.ico 0B
trix-1563ff9c10f74e143b3ded40a8458497eaf2f87a648a5cbbfebdb7dec3447a5e.js 324KB
actiontext-28c61f5197c204db043317a8f8826a87ab31495b741f854d307ca36122deefce.js 30KB
activestorage-3ab61e47dd4ee2d79db525ade1dca2ede0ea2b7371fe587e408ee37b7ade265d.js 28KB
activestorage.esm-01f58a45d77495cdfbdfcc872902a430426c4391634ec9c3da5f69fbf8418492.js 26KB
application-8550e8e4eac1040eca5d54f5ce7f0bcc4c54c5189554124077cb8b8c2e6b4bc5.js 16KB
cable-0a3b76e040acca4b722c81fdb5277b2bcf676e872baea2fc5cded4175091d9d2.js 16KB
actioncable-5433453f9b6619a9de91aaab2d7fc7ff183e5260c0107cbc9a1aa0c838d9a74e.js 15KB
actioncable.esm-e01089c3ec4fe7817fa9abcad06cab6bdc387f95f0ca6aab4bf7ba7537f70690.js 14KB
application.js 677B
cable.js 360B
manifest.js 102B
manifest-b84bfa46a33d7f0dc4d2e7b8889486c9a957a5e40713d58f54be71b66954a1ff.js 4B
.sprockets-manifest-ec3e813dd532b00b7c108252c895feb5.json 4KB
package.json 63B
.keep 0B
.keep 0B
.keep 0B
.keep 0B
.keep 0B
.keep 0B
Gemfile.lock 4KB
README.md 2KB
MIT-LICENSE 1KB
apple-touch-icon.png 0B
apple-touch-icon-precomposed.png 0B
rails 141B
uncommon_password_tasks.rake 102B
rake 90B
Rakefile 567B
Rakefile 227B
devise.rb 13KB
production.rb 4KB
puma.rb 2KB
uncommon_password_test.rb 2KB
development.rb 2KB
test.rb 2KB
schema.rb 1KB
20170614164225_devise_create_users.rb 1KB
model.rb 1KB
test_helper.rb 836B
inflections.rb 647B
assets.rb 630B
application.rb 541B
wrap_parameters.rb 485B
backtrace_silencers.rb 404B
uncommon_password.rb 367B
user.rb 287B
cookies_serializer.rb 244B
boot.rb 233B
filter_parameter_logging.rb 194B
application_controller_renderer.rb 162B
routes.rb 159B
mime_types.rb 156B
environment.rb 128B
user_test.rb 118B
spring.rb 111B
application_mailer.rb 102B
application_controller.rb 97B
connection.rb 85B
channel.rb 79B
application_record.rb 78B
version.rb 72B
application_job.rb 43B
application_helper.rb 29B
config.ru 130B
setup 995B
test 138B
passwords.txt 81KB
共 110 条
- 1
- 2
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功