mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-05 06:09:12 +02:00
fix(docs): Fix comments content and style
Changed some bad comments referencing the Articles module in other modules.
Typo fixed in xxx.client.modules.js files ("Application" => "Applicaion")
Full stop character removed at the end of line comments
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* Module dependencies
|
||||
*/
|
||||
var mongoose = require('mongoose'),
|
||||
Schema = mongoose.Schema,
|
||||
@@ -168,7 +168,7 @@ UserSchema.statics.findUniqueUsername = function (username, suffix, callback) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates a random passphrase that passes the owasp test.
|
||||
* Generates a random passphrase that passes the owasp test
|
||||
* Returns a promise that resolves with the generated passphrase, or rejects with an error if something goes wrong.
|
||||
* NOTE: Passphrases are only tested against the required owasp strength tests, and not the optional tests.
|
||||
*/
|
||||
@@ -177,8 +177,8 @@ UserSchema.statics.generateRandomPassphrase = function () {
|
||||
var password = '';
|
||||
var repeatingCharacters = new RegExp('(.)\\1{2,}', 'g');
|
||||
|
||||
// iterate until the we have a valid passphrase.
|
||||
// NOTE: Should rarely iterate more than once, but we need this to ensure no repeating characters are present.
|
||||
// iterate until the we have a valid passphrase
|
||||
// NOTE: Should rarely iterate more than once, but we need this to ensure no repeating characters are present
|
||||
while (password.length < 20 || repeatingCharacters.test(password)) {
|
||||
// build the random password
|
||||
password = generatePassword.generate({
|
||||
@@ -189,7 +189,7 @@ UserSchema.statics.generateRandomPassphrase = function () {
|
||||
excludeSimilarCharacters: true,
|
||||
});
|
||||
|
||||
// check if we need to remove any repeating characters.
|
||||
// check if we need to remove any repeating characters
|
||||
password = password.replace(repeatingCharacters, '');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user