devise-uncommon_password 0.3.5 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
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
|
[![Build Status](https://travis-ci.org/HCLarsen/devise-uncommon_password.svg?branch=master)](https://travis-ci.org/HCLarsen/devise-uncommon_password)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/HCLarsen/devise-uncommon_password.svg)](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: '
|
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: '
|
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,21 +49,27 @@ 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
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 1.3.6
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.5'
|
60
63
|
type: :development
|
61
64
|
prerelease: false
|
62
65
|
version_requirements: !ruby/object:Gem::Requirement
|
63
66
|
requirements:
|
64
67
|
- - ">="
|
65
68
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
69
|
+
version: 1.3.6
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '1.5'
|
67
73
|
description: Devise extension to prevent users from using a common password.
|
68
74
|
email:
|
69
75
|
- clarsenipod@gmail.com
|
@@ -75,6 +81,7 @@ files:
|
|
75
81
|
- README.md
|
76
82
|
- Rakefile
|
77
83
|
- lib/devise/uncommon_password.rb
|
84
|
+
- lib/devise/uncommon_password/locales/en.yml
|
78
85
|
- lib/devise/uncommon_password/model.rb
|
79
86
|
- lib/devise/uncommon_password/passwords.txt
|
80
87
|
- lib/devise/uncommon_password/version.rb
|
@@ -83,7 +90,7 @@ homepage: https://github.com/HCLarsen/devise-uncommon_passwords
|
|
83
90
|
licenses:
|
84
91
|
- MIT
|
85
92
|
metadata: {}
|
86
|
-
post_install_message:
|
93
|
+
post_install_message:
|
87
94
|
rdoc_options: []
|
88
95
|
require_paths:
|
89
96
|
- lib
|
@@ -91,16 +98,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
98
|
requirements:
|
92
99
|
- - ">="
|
93
100
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
101
|
+
version: 2.3.0
|
95
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
103
|
requirements:
|
97
104
|
- - ">="
|
98
105
|
- !ruby/object:Gem::Version
|
99
106
|
version: '0'
|
100
107
|
requirements: []
|
101
|
-
|
102
|
-
|
103
|
-
signing_key:
|
108
|
+
rubygems_version: 3.0.8
|
109
|
+
signing_key:
|
104
110
|
specification_version: 4
|
105
111
|
summary: Devise extension to prevent users from using a common password.
|
106
112
|
test_files: []
|