Skip to content

Commit

Permalink
Remove dependency on eval() - fixes #19
Browse files Browse the repository at this point in the history
Signed-off-by: Morris Jobke <[email protected]>
  • Loading branch information
MorrisJobke committed Sep 28, 2018
1 parent 5e6e7bb commit 3d97599
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ Versions
--------

<dl>
<dt>0.5.4</dt>
<dd>
<ul>
<li>do not use `eval()` anymore (#19)</li>
</ul>
</dd>
<dt>0.5.3</dt>
<dd>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strengthify",
"version": "0.5.3",
"version": "0.5.4",
"homepage": "https://github.com/MorrisJobke/strengthify",
"authors": [
"Eve Ragins <[email protected]",
Expand Down
14 changes: 6 additions & 8 deletions jquery.strengthify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Strengthify - show the weakness of a password (uses zxcvbn for this)
* https://github.com/MorrisJobke/strengthify
*
* Version: 0.5.3
* Version: 0.5.4
* Author: Morris Jobke (github.com/MorrisJobke) - original
* Eve Ragins @ Eve Corp (github.com/eve-corp)
*
Expand Down Expand Up @@ -207,13 +207,11 @@

$elem.parent().on('scroll', drawSelf);

$.ajax({
cache: true,
url: options.zxcvbn
}).done(function(content) {
eval(content);
$elem.bind('keyup input change', drawSelf);
});
var script = document.createElement("script");
script.src = options.zxcvbn;
document.head.appendChild(script);

$elem.bind('keyup input change', drawSelf);
};

init.call(this);
Expand Down
2 changes: 1 addition & 1 deletion jquery.strengthify.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion strengthify.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Strengthify - show the weakness of a password (uses zxcvbn for this)
* https://github.com/MorrisJobke/strengthify
* Version: 0.5.3
* Version: 0.5.4
* License: The MIT License (MIT)
* Copyright (c) 2013-2016 Morris Jobke <[email protected]>
*/
Expand Down

0 comments on commit 3d97599

Please sign in to comment.