Commit 991c6c3
committed
fix: address critical security and reliability issues
Address all critical issues identified in code review:
Security fixes:
- Add UUID validation for recordingId parameters (prevents path traversal)
- Improve platform detection to only fallback to title-based when URL unavailable
- Add warning logs when using title-only detection
Reliability improvements:
- Set sdkInitialized flag early to prevent race conditions
- Add check for existing posthogClient to prevent duplicate initialization
- Improve error messages in IPC handlers with actionable guidance
- Add SDK state checks alongside client checks
These changes eliminate potential attack vectors and improve
robustness of the Recall SDK integration.1 parent fca969f commit 991c6c3
2 files changed
+77
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
254 | 268 | | |
255 | 269 | | |
256 | 270 | | |
| |||
275 | 289 | | |
276 | 290 | | |
277 | 291 | | |
| 292 | + | |
278 | 293 | | |
279 | 294 | | |
280 | 295 | | |
| |||
293 | 308 | | |
294 | 309 | | |
295 | 310 | | |
| 311 | + | |
296 | 312 | | |
297 | 313 | | |
298 | 314 | | |
| |||
341 | 357 | | |
342 | 358 | | |
343 | 359 | | |
| 360 | + | |
344 | 361 | | |
345 | 362 | | |
346 | 363 | | |
| |||
365 | 382 | | |
366 | 383 | | |
367 | 384 | | |
| 385 | + | |
368 | 386 | | |
369 | 387 | | |
370 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
39 | 48 | | |
40 | 49 | | |
41 | 50 | | |
42 | | - | |
43 | | - | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
| |||
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | | - | |
213 | | - | |
| 215 | + | |
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
218 | | - | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | | - | |
223 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
224 | 253 | | |
225 | 254 | | |
226 | 255 | | |
| |||
262 | 291 | | |
263 | 292 | | |
264 | 293 | | |
265 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
266 | 300 | | |
267 | 301 | | |
268 | 302 | | |
269 | 303 | | |
270 | 304 | | |
271 | 305 | | |
272 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
273 | 312 | | |
274 | 313 | | |
275 | 314 | | |
276 | 315 | | |
277 | 316 | | |
278 | 317 | | |
279 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
280 | 324 | | |
281 | 325 | | |
282 | 326 | | |
| |||
0 commit comments