Compare commits

...

4 Commits

Author SHA1 Message Date
Levente Orban
02975a0abd fix: insecure randomness
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-28 07:46:02 +01:00
Levente Orban
aebe477f90 fix: add missing envs 2025-10-27 21:57:20 +01:00
Levente Orban
325237d414 fix: add missing envs 2025-10-27 21:46:58 +01:00
Levente Orban
24e9d8b626 feat: add pino logger for serverside 2025-10-27 17:18:27 +01:00
2 changed files with 10 additions and 1 deletions

View File

@@ -7,6 +7,12 @@ RUN npm ci
ARG PUBLIC_LANDING_INFO
ENV PUBLIC_LANDING_INFO=$PUBLIC_LANDING_INFO
ARG LOG_PRETTY
ENV LOG_PRETTY=$LOG_PRETTY
ARG LOG_LEVEL
ENV LOG_LEVEL=$LOG_LEVEL
COPY . .
RUN npm run build

View File

@@ -1,5 +1,8 @@
import { randomBytes } from 'crypto';
export const generateUserId = () => {
const userId = 'user_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
const secureRandomString = randomBytes(8).toString('base36').substr(0, 9);
const userId = 'user_' + Date.now() + '_' + secureRandomString;
return userId;
};