Skip to content
This repository was archived by the owner on Feb 22, 2021. It is now read-only.

Commit 5f5aaf4

Browse files
authored
Remove top 100 passwords check due to deprecated link (#121) (#122)
1 parent ddef4e1 commit 5f5aaf4

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

app/assets/javascripts/password.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,27 @@ $(document).on('turbolinks:load', function() {
5454
return password.length >= 10
5555
}
5656

57-
window.checkTop100 = function(password) {
58-
if (!window.top100) {
59-
getTop100().then(function() {
60-
return !window.top100.includes(password)
61-
})
62-
} else {
63-
return !window.top100.includes(password)
64-
}
65-
66-
}
67-
68-
function getTop100() {
69-
return $.ajax({
70-
url: 'https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_100.txt'
71-
}).then(function(data) {
72-
window.top100 = data
73-
})
74-
}
75-
7657
window.ensureDoesntMatchEmail = function(password) {
7758
return $('#registration_email').val() != password
7859
}
60+
61+
// window.checkTop100 = function(password) {
62+
// if (!window.top100) {
63+
// getTop100().then(function() {
64+
// return !window.top100.includes(password)
65+
// })
66+
// } else {
67+
// return !window.top100.includes(password)
68+
// }
69+
//
70+
// }
71+
72+
// function getTop100() {
73+
// return $.ajax({
74+
// url: 'https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_100.txt'
75+
// }).then(function(data) {
76+
// window.top100 = data
77+
// })
78+
// }
7979
}
8080
})

app/views/passwords/edit.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</ol>
1515
</div>
1616
<div id="showHidePassword">
17-
<%= password_field_tag :password, nil, id: "reset_password", data: { rules: "checkLength,checkTop100" } %>
17+
<%= password_field_tag :password, nil, id: "reset_password", data: { rules: "checkLength" } %>
1818
</div>
1919
</div>
2020

app/views/users/new.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
<p>We know password rules are annoying, but there are some easy ways to ensure your account remains secure. For more info on why we use these password constraints, check out <%= link_to 'Password Rules Are Bullshit', 'https://blog.codinghorror.com/password-rules-are-bullshit/', target: '_blank' %> on the Coding Horror blog.</p>
4040
<ol>
4141
<li>Minimum length of 10 characters <span class="xMark"></span></li>
42-
<li>Isn't in the <%= link_to 'top 100', 'https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_100.txt'%> most common passwords <span class="xMark"></span></li>
42+
<!-- <li>Isn't in the <%#= link_to 'top 100', 'https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_100.txt'%> most common passwords <span class="xMark"></span></li> -->
4343
<li>Doesn't match your email <span class="xMark"></span></li>
4444
</ol>
4545
</div>
4646
<div id="showHidePassword">
47-
<%= f.password_field :password, data: { rules: "checkLength,checkTop100,ensureDoesntMatchEmail" } %>
47+
<%= f.password_field :password, data: { rules: "checkLength,ensureDoesntMatchEmail" } %>
4848
</div>
4949
</div>
5050

0 commit comments

Comments
 (0)