jshint cleanup
This commit is contained in:
Родитель
3d88bc81b2
Коммит
50571901b9
|
@ -2,16 +2,12 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var crypto = require('crypto')
|
||||
var P = require('p-promise')
|
||||
var ClientApi = require('./api')
|
||||
var butil = require('../crypto/butil')
|
||||
var pbkdf2 = require('../crypto/pbkdf2')
|
||||
var hkdf = require('../crypto/hkdf')
|
||||
var tokens = require('../tokens')({ trace: function () {}})
|
||||
var Bundle = tokens.Bundle
|
||||
|
||||
var NULL = Buffer('0000000000000000000000000000000000000000000000000000000000000000', 'hex')
|
||||
|
||||
function Client(origin) {
|
||||
this.uid = null
|
||||
|
@ -139,7 +135,7 @@ Client.prototype.auth = function () {
|
|||
return this.api.accountLoginAndGetKeys(this.email, this.authPW)
|
||||
.then(
|
||||
function (data) {
|
||||
this.uid = data.uid,
|
||||
this.uid = data.uid
|
||||
this.sessionToken = data.sessionToken
|
||||
this.keyFetchToken = data.keyFetchToken
|
||||
this.verified = data.verified
|
||||
|
@ -309,7 +305,6 @@ Client.prototype.resetPassword = function (newPassword) {
|
|||
throw new Error("call verifyPasswordResetCode before calling resetPassword");
|
||||
}
|
||||
// this will generate a new wrapKb on the server
|
||||
var wrapKb = NULL
|
||||
return this.setupCredentials(this.email, newPassword)
|
||||
.then(
|
||||
function (bundle) {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
module.exports.buffersAreEqual = function buffersAreEqual(buffer1, buffer2) {
|
||||
var mismatch = buffer1.length - buffer2.length
|
||||
if (mismatch) {
|
||||
|
|
|
@ -291,9 +291,9 @@ module.exports = function (
|
|||
Heap.prototype.deletePasswordChangeToken = function (passwordChangeToken) {
|
||||
log.trace(
|
||||
{
|
||||
op: 'Heap.deletePasswordForgotToken',
|
||||
id: passwordForgotToken && passwordForgotToken.id,
|
||||
uid: passwordForgotToken && passwordForgotToken.uid
|
||||
op: 'Heap.deletePasswordChangeToken',
|
||||
id: passwordChangeToken && passwordChangeToken.id,
|
||||
uid: passwordChangeToken && passwordChangeToken.uid
|
||||
}
|
||||
)
|
||||
delete this.passwordChangeTokens[passwordChangeToken.id]
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
var HEX_STRING = require('./validators').HEX_STRING
|
||||
var LAZY_EMAIL = require('./validators').LAZY_EMAIL
|
||||
|
||||
var P = require('p-promise')
|
||||
var password = require('../crypto/password')
|
||||
|
||||
module.exports = function (log, crypto, P, uuid, isA, error, db, mailer, isProduction) {
|
||||
|
|
|
@ -28,8 +28,6 @@ module.exports = function (log, isA, error, db, mailer) {
|
|||
log.security({ event: 'pwd-change-request' })
|
||||
var form = request.payload
|
||||
var oldAuthPW = Buffer(form.oldAuthPW, 'hex')
|
||||
var newAuthSalt = crypto.randomBytes(32)
|
||||
var newVerifyHash = null
|
||||
|
||||
db.emailRecord(form.email)
|
||||
.then(
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env node
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
if (!process.env.NO_COVERAGE) {
|
||||
var ass = require('ass').enable( {
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var test = require('../ptaptest')
|
||||
var crypto = require('crypto')
|
||||
var log = { trace: function() {} }
|
||||
|
||||
var tokens = require('../../tokens')(log)
|
||||
|
|
Загрузка…
Ссылка в новой задаче