java-shell package should use proper crypto.randomBytes() polyfill

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Minor - P4
    • 2.0.2
    • Affects Version/s: None
    • Component/s: Java Shell, Tech debt
    • None
    • Not Needed

      The JS BSON package wants a cryptographically secure randomness source. We use Math.random() here, but that’s not a proper long-term solution:

       

      https://github.com/mongodb-js/mongosh/blob/9e5c1c2184554b6fe2eab8662669a52da219ab88/packages/java-shell/src/main/js/all.js#L1-L3

              Assignee:
              Unassigned
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: