[Web] Generate readable passwords

This commit is contained in:
andryyy
2019-06-20 10:18:09 +02:00
parent 39f95b8284
commit f35bc07a30
3 changed files with 761 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ $(document).ready(function() {
$(".generate_password").click(function( event ) {
event.preventDefault();
$('[data-hibp]').trigger('input');
var random_passwd = Math.random().toString(36).slice(-8)
var random_passwd = GPW.pronounceable(8)
$(this).closest("form").find("input[name='password']").prop('type', 'text');
$(this).closest("form").find("input[name='password2']").prop('type', 'text');
$(this).closest("form").find("input[name='password']").val(random_passwd);