Skip to content

List of surprising non-invariants #6

Description

@bakkot

A lot of vulnerabilities, both in implementations and in user code, come down to mistakenly assuming something is an invariant when it is not.

For example:

  • null and undefined are the only two nullish values (document.all)
  • .slice (and friends) on arrays and TAs constructs the same kind of array as the underlying one (Symbol.species) (e.g.)

What else?

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