Commit e4273f5
committed
Major Security Improvements:
- Enhanced user fingerprinting with WebGL, Canvas, and Audio fingerprinting
- Hardware binding to prevent F5/Ctrl+F5 abuse
- Persistent storage across browser sessions (localStorage + sessionStorage)
- Global demo session counter with 10 session limit per device
- Multi-tab protection (max 2 tabs simultaneously)
- Anti-reset protection with hardware mismatch detection
Demo Session Protection:
- Advanced fingerprint generation with CPU benchmarking
- Enhanced validation with cryptographic verification
- Automatic cleanup and session completion tracking
- Cooldown periods between sessions (1min + 15min completion)
- Weekly partial reset of global counters
Fixes:
- Fixed SessionTimer console spam after connection disconnect
- Added missing registerEnhancedDemoSessionUsage method
- Corrected method calls from generateUserFingerprint to generateAdvancedUserFingerprint
- Implemented proper event handling for connection state changes
WebRTC Improvements:
- Added peer-disconnect, new-connection, and connection-cleaned events
- Enhanced connection cleanup with proper UI notifications
- Fixed SessionTimer state management during disconnections
- Prevented infinite re-rendering and console logging
Performance Optimizations:
- Auto-save persistent data every 30 seconds
- Periodic cleanup of old session data (every 6 hours)
- Memory management for used preimages (10k limit)
- Tab heartbeat system for multi-tab detection
Testing:
- Demo sessions now properly enforce limits
- P2P anonymity maintained (no server validation)
- Compatible with incognito mode restrictions
- Resistant to common abuse techniques1 parent 3263583 commit e4273f5
File tree
5 files changed
+695
-134
lines changed- src
- components/ui
- network
- session
5 files changed
+695
-134
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3244 | 3244 | | |
3245 | 3245 | | |
3246 | 3246 | | |
3247 | | - | |
3248 | 3247 | | |
3249 | 3248 | | |
3250 | 3249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | | - | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | 49 | | |
| |||
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
45 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
53 | | - | |
54 | 66 | | |
55 | 67 | | |
56 | 68 | | |
| |||
81 | 93 | | |
82 | 94 | | |
83 | 95 | | |
84 | | - | |
85 | 96 | | |
86 | 97 | | |
87 | | - | |
88 | | - | |
| 98 | + | |
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
92 | | - | |
93 | 102 | | |
94 | 103 | | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
99 | | - | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
108 | | - | |
| 116 | + | |
109 | 117 | | |
110 | 118 | | |
| 119 | + | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
115 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
116 | 135 | | |
117 | 136 | | |
118 | 137 | | |
119 | 138 | | |
120 | 139 | | |
121 | 140 | | |
| 141 | + | |
122 | 142 | | |
123 | 143 | | |
124 | 144 | | |
125 | 145 | | |
126 | 146 | | |
127 | 147 | | |
| 148 | + | |
128 | 149 | | |
129 | | - | |
| 150 | + | |
130 | 151 | | |
131 | 152 | | |
132 | 153 | | |
| |||
145 | 166 | | |
146 | 167 | | |
147 | 168 | | |
148 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
149 | 173 | | |
150 | 174 | | |
151 | 175 | | |
152 | 176 | | |
153 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
154 | 181 | | |
155 | 182 | | |
156 | 183 | | |
157 | 184 | | |
158 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
159 | 189 | | |
160 | 190 | | |
161 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
162 | 196 | | |
163 | 197 | | |
164 | 198 | | |
| |||
179 | 213 | | |
180 | 214 | | |
181 | 215 | | |
182 | | - | |
183 | | - | |
| 216 | + | |
| 217 | + | |
184 | 218 | | |
185 | 219 | | |
186 | 220 | | |
| |||
247 | 281 | | |
248 | 282 | | |
249 | 283 | | |
250 | | - | |
| 284 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2505 | 2505 | | |
2506 | 2506 | | |
2507 | 2507 | | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
2508 | 2515 | | |
2509 | 2516 | | |
2510 | 2517 | | |
| |||
2712 | 2719 | | |
2713 | 2720 | | |
2714 | 2721 | | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
2715 | 2729 | | |
2716 | 2730 | | |
2717 | 2731 | | |
| |||
3252 | 3266 | | |
3253 | 3267 | | |
3254 | 3268 | | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
3255 | 3276 | | |
3256 | 3277 | | |
3257 | 3278 | | |
| |||
3263 | 3284 | | |
3264 | 3285 | | |
3265 | 3286 | | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
3266 | 3294 | | |
3267 | 3295 | | |
3268 | 3296 | | |
| |||
3322 | 3350 | | |
3323 | 3351 | | |
3324 | 3352 | | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
3325 | 3360 | | |
3326 | 3361 | | |
3327 | 3362 | | |
| |||
3390 | 3425 | | |
3391 | 3426 | | |
3392 | 3427 | | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
3393 | 3435 | | |
3394 | 3436 | | |
3395 | 3437 | | |
| |||
0 commit comments