mirror of
https://github.com/polaroi8d/cactoide.git
synced 2026-03-22 06:05:28 +00:00
Compare commits
4 Commits
feat/bette
...
fix/insecu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02975a0abd | ||
|
|
aebe477f90 | ||
|
|
325237d414 | ||
|
|
24e9d8b626 |
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user