devise-uncommon_password 0.3.6 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7fe5e34344eff0d4e62e35ae6c6a5e826d738d755026370ea1e153453bd1b63
|
4
|
+
data.tar.gz: ab9a7780548d41659f89612644f73eea42595a60816df48246748e4ca5306ef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69ca494fb28e4d0cb57b22284ab2ff3e6c0e7c3c2b032c4a43cae8968a1989ffc4566f5c658a737993d94be1c1530b10b162ef3f970b84ec26709ffd1274b1ff
|
7
|
+
data.tar.gz: 6a7f840461bbbff478b1609cc577c844ff493a99c52d647c872e211c4d061e5b0cf4e76ef6d4e6122cc1cd17d12c4aade6eb4de4c489727fe2aab1584966d01f
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[](https://travis-ci.org/HCLarsen/devise-uncommon_password)
|
4
4
|
[](https://codeclimate.com/github/HCLarsen/devise-uncommon_password)
|
5
5
|
|
6
|
-
Devise::UncommonPassword is an extension for the 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.
|
6
|
+
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.
|
7
7
|
|
8
8
|
## Usage
|
9
9
|
|
@@ -23,6 +23,23 @@ By default, the password is checked against the 100 most common passwords that f
|
|
23
23
|
config.password_matches = 1000
|
24
24
|
```
|
25
25
|
|
26
|
+
### Internationalization and Customization
|
27
|
+
|
28
|
+
The default message for users who attempt to use a common password is:
|
29
|
+
|
30
|
+
```
|
31
|
+
is a very common password. Please choose something harder to guess.
|
32
|
+
```
|
33
|
+
|
34
|
+
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.
|
35
|
+
|
36
|
+
```yml
|
37
|
+
en:
|
38
|
+
errors:
|
39
|
+
messages:
|
40
|
+
common_password: 'is a very common password. Please choose something harder to guess.'
|
41
|
+
```
|
42
|
+
|
26
43
|
## Installation
|
27
44
|
Add this line to your application's Gemfile:
|
28
45
|
|
@@ -16,7 +16,6 @@ module Devise
|
|
16
16
|
file.each { |password| passwords << password.chomp.downcase }
|
17
17
|
end
|
18
18
|
passwords.select! {|password| Devise.password_length.include? password.length }
|
19
|
-
#passwords[0..99]
|
20
19
|
passwords[0..Devise.password_matches-1]
|
21
20
|
end
|
22
21
|
|
@@ -32,7 +31,7 @@ module Devise
|
|
32
31
|
|
33
32
|
def not_common_password
|
34
33
|
if Devise::Models::UncommonPassword.common_passwords.include? password.downcase
|
35
|
-
errors.add(:password,
|
34
|
+
errors.add(:password, :common_password)
|
36
35
|
end
|
37
36
|
end
|
38
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-uncommon_password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Larsen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6.
|
22
|
+
version: '6.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6.
|
32
|
+
version: '6.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: devise
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '3.5'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '4.
|
42
|
+
version: '4.9'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '3.5'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '4.
|
52
|
+
version: '4.9'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: sqlite3
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- README.md
|
82
82
|
- Rakefile
|
83
83
|
- lib/devise/uncommon_password.rb
|
84
|
+
- lib/devise/uncommon_password/locales/en.yml
|
84
85
|
- lib/devise/uncommon_password/model.rb
|
85
86
|
- lib/devise/uncommon_password/passwords.txt
|
86
87
|
- lib/devise/uncommon_password/version.rb
|
@@ -89,7 +90,7 @@ homepage: https://github.com/HCLarsen/devise-uncommon_passwords
|
|
89
90
|
licenses:
|
90
91
|
- MIT
|
91
92
|
metadata: {}
|
92
|
-
post_install_message:
|
93
|
+
post_install_message:
|
93
94
|
rdoc_options: []
|
94
95
|
require_paths:
|
95
96
|
- lib
|
@@ -104,9 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
105
|
- !ruby/object:Gem::Version
|
105
106
|
version: '0'
|
106
107
|
requirements: []
|
107
|
-
|
108
|
-
|
109
|
-
signing_key:
|
108
|
+
rubygems_version: 3.0.8
|
109
|
+
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Devise extension to prevent users from using a common password.
|
112
112
|
test_files: []
|