Skip to content

Commit 3e8e55f

Browse files
authored
remove date from input for cookieless hash (#18154)
1 parent e5bba0f commit 3e8e55f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

components/server/src/analytics.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ export function createCookielessId(ip?: string, ua?: string): string | number |
4949
if (!ip || !ua) {
5050
return "unidentified-user"; //use placeholder if we cannot resolve IP and user agent
5151
}
52-
const date = new Date();
53-
const today = `${date.getDate()}/${date.getMonth()}/${date.getFullYear()}`;
5452
return crypto
5553
.createHash("sha512")
56-
.update(ip + ua + today)
54+
.update(ip + ua)
5755
.digest("hex");
5856
}
5957

0 commit comments

Comments
 (0)