Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

owasp-password-strength-test

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

owasp-password-strength-test - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

11

owasp-password-strength-test.js

@@ -97,2 +97,4 @@ (function(exports) {

errors : [],
failedTests : [],
passedTests : [],
isPassphrase : false,

@@ -104,2 +106,3 @@ strong : true,

// Always submit the password/passphrase to the required tests
var i = 0;
this.tests.required.forEach(function(test) {

@@ -110,3 +113,7 @@ var err = test(password);

result.errors.push(err);
result.failedTests.push(i);
} else {
result.passedTests.push(i);
}
i++;
});

@@ -125,2 +132,3 @@

if (!result.isPassphrase) {
var j = this.tests.required.length;
this.tests.optional.forEach(function(test) {

@@ -130,5 +138,8 @@ var err = test(password);

result.errors.push(err);
result.failedTests.push(j);
} else {
result.optionalTestsPassed++;
result.passedTests.push(j);
}
j++;
});

@@ -135,0 +146,0 @@ }

2

package.json
{
"name": "owasp-password-strength-test",
"version": "1.0.0",
"version": "1.1.0",
"description": "A password-strength tester based upon the OWASP guidelines for enforcing strong passwords.",

@@ -5,0 +5,0 @@ "main": "owasp-password-strength-test.js",

@@ -72,3 +72,3 @@ OWASP Password Strength Test

// `window.owaspPasswordStrengthTest` object availble.
var result = owaspPasswordStrenghTest.test('correct horse battery staple');
var result = owaspPasswordStrengthTest.test('correct horse battery staple');
```

@@ -81,2 +81,4 @@

errors : [],
failedTests : [],
passedTests : [ 0, 1, 2, 3, 4, 5, 6 ],
isPassphrase : false,

@@ -94,10 +96,12 @@ strong : true,

errors: [
'The password must be at least 10 characters long.',
'The password must contain at least one uppercase letter.',
'The password must contain at least one number.',
'The password must contain at least one special character.'
],
isPassphrase : false,
strong : false,
optionalTestsPassed : 1
'The password must be at least 10 characters long.',
'The password must contain at least one uppercase letter.',
'The password must contain at least one number.',
'The password must contain at least one special character.'
],
failedTests : [ 0, 4, 5, 6 ],
passedTests : [ 1, 2, 3 ],
isPassphrase : false,
strong : false,
optionalTestsPassed : 1
}

@@ -111,2 +115,8 @@ ```

- `failedTests` enumerates which tests have failed, beginning from 0 with the
first required test
- `passedTests` enumerates which tests have succeeded, beginning from 0 with
the first required test
- `isPassphrase` is a `boolean` indicating whether or not the password was

@@ -113,0 +123,0 @@ considered to be a passphrase.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc