Merge pull request #11592 from nextcloud/feature/noid/update-strengthify
Update strengthify to be able to set a nonce
This commit is contained in:
commit
f4387ed385
|
@ -31,7 +31,7 @@
|
||||||
"moment": "^2.15.0",
|
"moment": "^2.15.0",
|
||||||
"select2": "~3.4.8",
|
"select2": "~3.4.8",
|
||||||
"snapjs": "~2.0.0-rc1",
|
"snapjs": "~2.0.0-rc1",
|
||||||
"strengthify": "^0.5.3",
|
"strengthify": "^0.5.5",
|
||||||
"underscore": "~1.8.0",
|
"underscore": "~1.8.0",
|
||||||
"zxcvbn": "*"
|
"zxcvbn": "*"
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,7 @@ $(document).ready(function() {
|
||||||
t('core', 'Strong password')
|
t('core', 'Strong password')
|
||||||
],
|
],
|
||||||
drawTitles: true,
|
drawTitles: true,
|
||||||
|
nonce: btoa(OC.requestToken),
|
||||||
});
|
});
|
||||||
|
|
||||||
// centers the database chooser if it is too wide
|
// centers the database chooser if it is too wide
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "strengthify",
|
"name": "strengthify",
|
||||||
"version": "0.5.4",
|
"version": "0.5.5",
|
||||||
"homepage": "https://github.com/MorrisJobke/strengthify",
|
"homepage": "https://github.com/MorrisJobke/strengthify",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Eve Ragins <eve.ragins@eve-corp.com",
|
"Eve Ragins <eve.ragins@eve-corp.com",
|
||||||
|
@ -9,13 +9,13 @@
|
||||||
"description": "Combine jQuery and zxcvbn to create a password strength meter.",
|
"description": "Combine jQuery and zxcvbn to create a password strength meter.",
|
||||||
"main": "jquery.strengthify.js",
|
"main": "jquery.strengthify.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"_release": "0.5.4",
|
"_release": "0.5.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "0.5.4",
|
"tag": "0.5.5",
|
||||||
"commit": "3d9759958558752d0c115774d2b0bc34fac7e31b"
|
"commit": "5fa214146e2c7760046fb6c2e01aa9b02759e7d6"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MorrisJobke/strengthify.git",
|
"_source": "https://github.com/MorrisJobke/strengthify.git",
|
||||||
"_target": "^0.5.3",
|
"_target": "^0.5.5",
|
||||||
"_originalSource": "strengthify"
|
"_originalSource": "strengthify"
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
* Strengthify - show the weakness of a password (uses zxcvbn for this)
|
* Strengthify - show the weakness of a password (uses zxcvbn for this)
|
||||||
* https://github.com/MorrisJobke/strengthify
|
* https://github.com/MorrisJobke/strengthify
|
||||||
*
|
*
|
||||||
* Version: 0.5.4
|
* Version: 0.5.5
|
||||||
* Author: Morris Jobke (github.com/MorrisJobke) - original
|
* Author: Morris Jobke (github.com/MorrisJobke) - original
|
||||||
* Eve Ragins @ Eve Corp (github.com/eve-corp)
|
* Eve Ragins @ Eve Corp (github.com/eve-corp)
|
||||||
*
|
*
|
||||||
|
@ -52,7 +52,8 @@
|
||||||
drawTitles: false,
|
drawTitles: false,
|
||||||
drawMessage: false,
|
drawMessage: false,
|
||||||
drawBars: true,
|
drawBars: true,
|
||||||
$addAfter: null
|
$addAfter: null,
|
||||||
|
nonce: null
|
||||||
};
|
};
|
||||||
|
|
||||||
return this.each(function() {
|
return this.each(function() {
|
||||||
|
@ -209,6 +210,9 @@
|
||||||
|
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
script.src = options.zxcvbn;
|
script.src = options.zxcvbn;
|
||||||
|
if (options.nonce !== null) {
|
||||||
|
script.nonce = options.nonce;
|
||||||
|
}
|
||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
|
|
||||||
$elem.bind('keyup input change', drawSelf);
|
$elem.bind('keyup input change', drawSelf);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* Strengthify - show the weakness of a password (uses zxcvbn for this)
|
* Strengthify - show the weakness of a password (uses zxcvbn for this)
|
||||||
* https://github.com/MorrisJobke/strengthify
|
* https://github.com/MorrisJobke/strengthify
|
||||||
* Version: 0.5.4
|
* Version: 0.5.5
|
||||||
* License: The MIT License (MIT)
|
* License: The MIT License (MIT)
|
||||||
* Copyright (c) 2013-2016 Morris Jobke <morris.jobke@gmail.com>
|
* Copyright (c) 2013-2016 Morris Jobke <morris.jobke@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -81,5 +81,6 @@ $(document).ready(function () {
|
||||||
],
|
],
|
||||||
drawTitles: true,
|
drawTitles: true,
|
||||||
$addAfter: $('input[name="newpassword-clone"]'),
|
$addAfter: $('input[name="newpassword-clone"]'),
|
||||||
|
nonce: btoa(OC.requestToken),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue