From 0951b838caba10b17da99723a2a007b17fa5448a Mon Sep 17 00:00:00 2001 From: Rafid Aslam Date: Tue, 6 Dec 2016 15:28:59 +0700 Subject: [PATCH] deps: Update zxcvbn to 4.4.1 Update zxcvbn to 4.4.1, and change `crack_time` to `crack_times_seconds` because `crack_time` has been changed to `crack_times_seconds` in 4.4.1. --- static/js/common.js | 3 ++- tools/setup/download-zxcvbn | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/common.js b/static/js/common.js index 052357e47b..33731e762d 100644 --- a/static/js/common.js +++ b/static/js/common.js @@ -26,7 +26,8 @@ function password_quality(password, bar) { if (bar !== undefined) { // Compute a quality score in [0,1]. var result = zxcvbn(password); - var quality = Math.min(1, Math.log(1 + result.crack_time) / 22); + var quality = Math.min(1,Math.log(1 + result.crack_times_seconds. + offline_slow_hashing_1e4_per_second) / 22); // Even if zxcvbn loves your short password, the bar should be filled // at most 1/3 of the way, because we won't accept it. diff --git a/tools/setup/download-zxcvbn b/tools/setup/download-zxcvbn index 214e6858f1..dd76a4f8b5 100755 --- a/tools/setup/download-zxcvbn +++ b/tools/setup/download-zxcvbn @@ -4,7 +4,7 @@ set -x output_path=static/third/zxcvbn commit_file_path=$output_path/commit -commit=0890678ede1488ecb02cda7eb793cd308a59c49d # Change this to upgrade +commit=f15783727ac828f5a7e54ff5aed8dd8b38a62ffd # Change this to upgrade mkdir -p "$output_path"