Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
password-strength-meter
Advanced tools
A password strength meter for jQuery. Give it a try!
Using npm
npm install --save password-strength-meter
Using bower
bower install --save password-strength-meter
For manual installations check out the releases section for tarballs.
Import the required scripts:
<script src="./js/password-strength-meter/password.min.js"></script>
<script src="./js/password-strength-meter/password.min.css"></script>
Ensure your password field has a wrapper div, like in Bootstrap:
<div class="form-group">
<label for="password">
Password
</label>
<input id="password" type="password" class="form-control" />
</div>
And call the plugin when you wanna enable it:
$('#password').password({ /* options */ });
Here's the list of available options you can pass to the password
plugin:
$('#password').password({
shortPass: 'The password is too short',
badPass: 'Weak; try combining letters & numbers',
goodPass: 'Medium; try using special charecters',
strongPass: 'Strong password',
containsUsername: 'The password contains the username',
enterPass: 'Type your password',
showPercent: false,
showText: true, // shows the text tips
animate: true, // whether or not to animate the progress bar on input blur/focus
animateSpeed: 'fast', // the above animation speed
username: false, // select the username field (selector or jQuery instance) for better password checks
usernamePartialMatch: true, // whether to check for username partials
minimumLength: 4 // minimum password length (below this threshold, the score is 0)
});
There are two events fired by the password
plugin:
$('#password').on('password.score', (e, score) => {
console.log('Called every time a new score is calculated (this means on every keyup)')
console.log('Current score is %d', score)
})
$('#password').on('password.text', (e, text, score) => {
console.log('Called every time the text is changed (less updated than password.score)')
console.log('Current message is %s with a score of %d', text, score)
})
This plugin was originally created in 2010 for jQuery 1.14, and the current relase has been tested under jQuery 1, 2 & 3.
It should work in all browsers (even IE 666).
First you'll need to grab the code, as the npm version does not come with the source files:
git clone https://github.com/elboletaire/password-strength-meter.git
cd password-strength-meter
npm install
npm test
# or with coverage...
npm run coverage
Note: tests are just run using jQuery 3.
Why another library? Well, I found this on March 11th (of 2017) cleaning up my documents folder and noticed I made it in 2010 and never published it, so I decided to refactor it "a bit" (simply remade it from the ground-up) and publish it, so others can use it.
Created by Òscar Casajuana .
Based on unlicensed work by Firas Kassem, published in 2007 and modified by Amin Rajaee in 2009.
This code is licensed under a GPL 3.0 license.
FAQs
A password strength meter plugin for jQuery
We found that password-strength-meter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.