Skip to content

The WebSocket masks need to be generated by random_bytes #2327

Description

@robrwo

The RFC for websockets states that the random numbers should be unpredictable. The only vulnerability is cache-poisoning in a non-encrypted environment.

However, since 9.46 Mojo::Util has a rand0m_bytes function that returns bytes from the system CSPRNG. This change should have been included in #2317 when that was added.

This is a small and simple change that ticks a box for RFC compliance.

See #2326.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions