Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instance of UnauthorizedError couldn't be checked with instanceof #292

Closed
arthurchumak opened this issue May 19, 2022 · 2 comments
Closed

Comments

@arthurchumak
Copy link

Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.

Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.

By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.

Description

Instance of UnauthorizedError couldn't be checked with instanceof

Reproduction

package.json

{
  "main": "index.js",
  "type": "module",
  "dependencies": {
    "express-jwt": "^7.7.1"
  }
}

index.js

import { UnauthorizedError } from 'express-jwt';

const e = new UnauthorizedError('credentials_bad_format', new Error('a'));

console.log(e instanceof UnauthorizedError);

log

node index.js 
false

Environment

Please provide the following:

  • Version of this library used: 7.7.1
  • Version of the platform or framework used, if applicable: no
  • Other relevant versions (language, server software, OS, browser): linux, node.js 16.14.2; npm 8.3.2
  • Other modules/plugins/libraries that might be involved:
@jfromaniello
Copy link
Member

Thank you very much for reporting this. It is fixed in v7.7.2

@arthurchumak
Copy link
Author

@jfromaniello thanks you too, for such quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants