From f43781b137a0c118d4bb493e8e4ce75c490d2f74 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Fri, 21 May 2021 21:54:30 -0500 Subject: [PATCH] :bug: Switch back to bcryptjs to fix issues with FreeBSD and ARM #1696 --- packages/cli/package.json | 3 ++- packages/cli/src/Server.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 2955cd9507..252994f485 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -55,6 +55,7 @@ "devDependencies": { "@oclif/dev-cli": "^1.22.2", "@types/basic-auth": "^1.1.2", + "@types/bcryptjs": "^2.4.2", "@types/bull": "^3.3.10", "@types/compression": "1.0.1", "@types/connect-history-api-fallback": "^1.3.1", @@ -79,11 +80,11 @@ "typescript": "~3.9.7" }, "dependencies": { - "@node-rs/bcrypt": "^1.2.0", "@oclif/command": "^1.5.18", "@oclif/errors": "^1.2.2", "@types/jsonwebtoken": "^8.3.4", "basic-auth": "^2.0.1", + "bcryptjs": "^2.4.3", "body-parser": "^1.18.3", "body-parser-xml": "^1.1.0", "bull": "^3.19.0", diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index 0346558d50..a758d045b6 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -22,7 +22,9 @@ import { RequestOptions } from 'oauth-1.0a'; import * as csrf from 'csrf'; import * as requestPromise from 'request-promise-native'; import { createHmac } from 'crypto'; -import { compare } from '@node-rs/bcrypt'; +// IMPORRTANT! Do not switch to anther bcrypt library unless really needed and +// tested with all possible systems like Windows, Alpine on ARM, FreeBSD, ... +import { compare } from 'bcryptjs'; import * as promClient from 'prom-client'; import {