Skip to content

Invalid Auth token causes the node process to crash #953

@AllanOliveiraM

Description

@AllanOliveiraM

Package + Version

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • gatsby-plugin-clerk
  • build/tooling/chore
  • other:

Version:

^4.7.13

Browser/OS

x

Description

When performing a request with Authorization header with a token value that is invalid, in this case I inserted an "s" character before the complete token string, an error causes the node process to crash

image

I using Nest ClerkExpressRequireAuth Middlware

I believe a try catch is needed here:

image
image

This error causes a crash that I couldn't handle with ExceptionFilters
Any suggestion?
i think this can be used for dos

Metadata

Metadata

Assignees

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