aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2025-05-23 19:45:26 -0700
committerDan Fandrich <danf@mageia.org>2025-05-23 19:47:50 -0700
commit4687b88f87b303e15b0ce42b62cf0279d499c8ea (patch)
treed37d3129de163398b521dfe46ba8909b7c4aa4dc
parenta4e54d7342bdf640c59b370ad960b6f3fb8fef7f (diff)
downloadpuppet-4687b88f87b303e15b0ce42b62cf0279d499c8ea.tar
puppet-4687b88f87b303e15b0ce42b62cf0279d499c8ea.tar.gz
puppet-4687b88f87b303e15b0ce42b62cf0279d499c8ea.tar.bz2
puppet-4687b88f87b303e15b0ce42b62cf0279d499c8ea.tar.xz
puppet-4687b88f87b303e15b0ce42b62cf0279d499c8ea.zip
Use a fixed random number in the cookie
The intent of this cookie isn't actually to track sessions, so eliminate any privacy impact by using a fixed number instead.
-rw-r--r--modules/viewvc/files/setcookieredirect.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/viewvc/files/setcookieredirect.html b/modules/viewvc/files/setcookieredirect.html
index 04ec8e80..3adefed2 100644
--- a/modules/viewvc/files/setcookieredirect.html
+++ b/modules/viewvc/files/setcookieredirect.html
@@ -3,7 +3,7 @@
<head>
<title>User check</title>
<script type="text/javascript" defer>
- const randomValue = Math.random().toString(36).substring(2);
+ const randomValue = "6436"; // Chosen by fair dice roll. Guaranteed to be random.
document.cookie = `session=${randomValue}; path=/; expires=${new Date(Date.now() + 24*3600*1000).toUTCString()}`;
const params = new Proxy(new URLSearchParams(window.location.search), {
get: (searchParams, prop) => searchParams.get(prop),