Skip to content

Commit

Permalink
Merge branch 'master' into rpb/firestore-1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpbrewster committed Feb 21, 2019
2 parents 7ab85b6 + 45b2ccd commit fcbf7d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ fixed - Multi-Site predeploy and postdeploy hooks now trigger
feature - Added support to set and get feature flag defaultWriteSizeLimit for RTDB.
feature - Introduced `debug(...)` function to Firestore emulator security rules
fixed - Simplified how Firestore emulator evaluates rules
fixed - Importing Auth users with MD5 or SHAs now have correct validation
8 changes: 8 additions & 0 deletions src/accountImporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ var _validateRequiredParameters = function(options) {
case "SHA1":
case "SHA256":
case "SHA512":
var roundsNum = parseInt(options.rounds, 10);
if (isNaN(roundsNum) || roundsNum < 0 || roundsNum > 8192) {
return utils.reject(
"Must provide valid rounds(0..8192) for hash algorithm " + options.hashAlgo,
{ exit: 1 }
);
}
return { hashAlgo: hashAlgo, rounds: options.rounds, valid: true };
case "PBKDF_SHA1":
case "PBKDF2_SHA256":
var roundsNum = parseInt(options.rounds, 10);
Expand Down

0 comments on commit fcbf7d4

Please sign in to comment.