mirror of
https://github.com/polaroi8d/cactoide.git
synced 2026-03-22 06:05:28 +00:00
Compare commits
2 Commits
fix/insecu
...
revert-49-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa9a79192c | ||
|
|
7275084ab9 |
@@ -1,8 +1,5 @@
|
||||
import { randomBytes } from 'crypto';
|
||||
|
||||
export const generateUserId = () => {
|
||||
const secureRandomString = randomBytes(8).toString('base36').substr(0, 9);
|
||||
const userId = 'user_' + Date.now() + '_' + secureRandomString;
|
||||
const userId = 'user_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
|
||||
|
||||
return userId;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user