Skip to content

DID token validate fails open on non-finite ext/nbf/iat #138

Description

@SashaMIT

Token.validate compares ext and nbf with > / <. Python json.loads accepts NaN and Infinity by default. Those comparisons are always false, so ext: Infinity never expires and nbf: NaN never blocks use. A string such as "never" raises TypeError instead of DIDTokenMalformed.

Language-split of magiclabs/magic-admin-js#156.

Happy to open a PR that fail-closes on non-finite iat / ext / nbf.

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