Skip to content

jwt.verify() not truly async. #511

Open
@vicary

Description

@vicary

Despite the verify action is in fact synchronize, the callback API does not.

It is specifically this line that released Zalgo.

done = callback;

Which can be fixed by wrapping it as such

    done = function(err, data) {
      setImmediate(callback, err, data);
    };

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