From deff76e1078d1c598b6b547391c8f6d3288566c7fc1234057e3194fd97e29871 Mon Sep 17 00:00:00 2001 From: deslokitty Date: Thu, 8 Jan 2026 08:28:26 +0100 Subject: [PATCH] chore: add hmac secret generation on bloom Signed-off-by: deslokitty --- bloom.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bloom.js b/bloom.js index 4a5ded7..375dcb2 100644 --- a/bloom.js +++ b/bloom.js @@ -1,3 +1,6 @@ +const crypto = require("node:crypto"); +const fs = require("node:fs"); + const sqlite = require("better-sqlite3"); const uuid = require("uuid"); @@ -21,5 +24,7 @@ database.prepare("INSERT INTO fluff_authentication_base(id, identifier, passhash database.prepare("INSERT INTO fluff_services(id, displayName, shortDescription, tosLink, ppLink, ownerId, approved) VALUES (?, ?, ?, ?, ?, ?, ?)").run(chatuuid, "chat domestique", "chat domestique is a heavily opinionated chat platform for silly kibbies >w<", "https://chatdomestique.fr/legal/termsofuse", "https://chatdomestique.fr/legal/privacypolicy", "https://internal.chatdomestique.fr/endpoint/desloratadyna" deslokittyuuid, 1); database.prepare("INSERT INTO fluff_authorised_services(id, serviceId, userId, authorisedAt) VALUES (?, ?, ?, ?)").run(authid, chatuuid, deslokittyuuid, Date.now()); +fs.writeFileSync("./hmacsecret", crypto.randomBytes(16).toString("base64url")); + database.close();