From 328faa3cda57008221092c924fe06d7de7a66cfc Mon Sep 17 00:00:00 2001 From: Antoine Jaussoin Date: Tue, 15 Feb 2022 14:58:27 +0000 Subject: [PATCH] Release v4.11.3 --- README.md | 4 ++++ backend/package.json | 2 +- backend/src/hardcoded.ts | 11 +++++++++++ backend/src/security/is-licenced.ts | 16 ++++++---------- docs/package.json | 2 +- frontend/package.json | 2 +- package.json | 2 +- 7 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 backend/src/hardcoded.ts diff --git a/README.md b/README.md index f6afe0257..c9b398f7c 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,10 @@ This will run a demo version, which you can turn into a fully licenced version b ## Versions History +### Version 4.11.3 (hotfix) + +- Adding hardcoded licence for a specific self-hosted client. + ### Version 4.11.2 (hotfix) - Encrypt chat messages on encrypted sessions diff --git a/backend/package.json b/backend/package.json index 768845c17..de407333a 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "@retrospected/backend", - "version": "4.11.2", + "version": "4.11.3", "license": "GNU GPLv3", "private": true, "scripts": { diff --git a/backend/src/hardcoded.ts b/backend/src/hardcoded.ts new file mode 100644 index 000000000..cab17b76e --- /dev/null +++ b/backend/src/hardcoded.ts @@ -0,0 +1,11 @@ +import { encrypt, hashPassword } from './utils'; + +export async function buildHardcodedLicence( + licenceKey: string, + company: string +): Promise { + console.log('Building hardcoded licence for: ', licenceKey); + const hash = await hashPassword(licenceKey); + console.log('Hash: ', hash); + console.log('Encrypted company name: ', encrypt(company, licenceKey)); +} diff --git a/backend/src/security/is-licenced.ts b/backend/src/security/is-licenced.ts index 9c51c8dfb..485d2b796 100644 --- a/backend/src/security/is-licenced.ts +++ b/backend/src/security/is-licenced.ts @@ -16,6 +16,12 @@ const hardcodedLicences: HardcodedLicence[] = [ hash: '$2a$10$kt4DnxKZEwvoh052JFygru7iLiIrTzSJngcJlaYkWm.tlNzRJx/Di', encryptedOwner: 'U2FsdGVkX18/e8sfZ3bpjz3pLQkCxloH8nuniFdU+vo=', }, + { + // Pear + hash: '$2a$10$33O/3uuETs0hKNIRWQzH5uQ8LgvZKhZumDcfy.izLLIzwqXmHRFu2', + encryptedOwner: + 'U2FsdGVkX1/weIyFN+TJEPkM0YF08D5CSD0vgrDOnouEveyXG2K/TurX63pBrhuR', + }, ]; export function isSelfHostedAndLicenced() { @@ -48,16 +54,6 @@ async function checkHardcodedLicence( return null; } -// async function buildHardcodedLicence( -// licenceKey: string, -// company: string -// ): Promise { -// console.log('Building hardcoded licence for: ', licenceKey); -// const hash = await hashPassword(licenceKey); -// console.log('Hash: ', hash); -// console.log('Encrypted company name: ', encrypt(company, licenceKey)); -// } - async function isLicencedBase(): Promise { const licenceKey = config.LICENCE_KEY; diff --git a/docs/package.json b/docs/package.json index 788fbd0fe..c78e95a0f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "4.11.2", + "version": "4.11.3", "private": true, "scripts": { "docusaurus": "docusaurus", diff --git a/frontend/package.json b/frontend/package.json index 738be8afc..faa32d690 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@retrospected/frontend", - "version": "4.11.2", + "version": "4.11.3", "license": "GNU GPLv3", "private": true, "dependencies": { diff --git a/package.json b/package.json index 6c75165e2..c1099d549 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "retrospected", - "version": "4.11.2", + "version": "4.11.3", "description": "An agile retrospective board - Powering www.retrospected.com", "private": true, "scripts": {