hoangvvo / next-connect

The TypeScript-ready, minimal router and middleware layer for Next.js, Micro, Vercel, or Node.js http/http2
https://www.npmjs.com/package/next-connect
MIT License
1.62k stars 65 forks source link

security: always return generic 500 error #197

Closed hoangvvo closed 2 years ago

hoangvvo commented 2 years ago

For security reason, we should always respond with "internal server error" while logging the error to console instead of responding with the error stack

Close #118

changeset-bot[bot] commented 2 years ago

⚠️ No Changeset found

Latest commit: 8d5461e6a2d8a68d4d0591d87212183e120c5552

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

codecov[bot] commented 2 years ago

Codecov Report

Merging #197 (8d5461e) into main (f0a1043) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #197   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          248       248           
  Branches        43        43           
=========================================
  Hits           248       248           
Impacted Files Coverage Δ
src/node.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f0a1043...8d5461e. Read the comment docs.