Skip to content

Commit 5c9e298

Browse files
Joonatan Mäkinenmradavi
andcommitted
Generate random download session id with crypto (merge commit)
Merge branch 'bugfix/insecure-randomness' into 'main' * Generate random download session id with crypto Closes #1238 See merge request https://gitlab.ci.csc.fi/sds-dev/sd-connect/swift-browser-ui/-/merge_requests/330 Approved-by: Joonatan Mäkinen <[email protected]> Approved-by: Felipe Morato Moreira <[email protected]> Co-authored-by: Monika Radaviciute <[email protected]> Merged by Joonatan Mäkinen <[email protected]>
2 parents 160c107 + 30becb4 commit 5c9e298

File tree

1 file changed

+1
-1
lines changed
  • swift_browser_ui_frontend/src/common

1 file changed

+1
-1
lines changed

swift_browser_ui_frontend/src/common/socket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export default class UploadSocket {
406406
) {
407407

408408
//get random id
409-
const sessionId = Math.random().toString(36).slice(2, 8);
409+
const sessionId = window.crypto.randomUUID().slice(0, 8);
410410

411411
let ownerName = "";
412412
if (owner) {

0 commit comments

Comments
 (0)