bug: Error handler exposes sensitive error information in response #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The global error handler includes the raw
errobject in JSON responses to clients. This exposes internal error objects, stack traces (in development), and potentially sensitive information about the application structure to attackers.Location
src/app/middlewares/global_error_handler.tsglobalErrorHandlermiddlewareHow to Fix
Remove the
errobject from the response and only send safe error information:Acceptance Criteria