Skip to content

uuid function in ol-layerswitcher.ts not cryptographically secure #514

@minusdavid

Description

@minusdavid

The bearer code security scanning tool flags the uuid function in ol-layerswitcher.js for using Math.random() instead of a crypto library or crypto API.

It would be interesting to use https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID although that's a HTTPS only API, which is a bit annoying.

The original Stackoverflow used for the algorithm has changed its answer: http://stackoverflow.com/a/2117523/526860

Maybe this package could be used instead? https://www.npmjs.com/package/uuid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions