Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/RestHandler.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ component extends="EventHandler" {
}
} : {}
)
.addMessage( "An exception ocurred: #arguments.exception.message#" )
.addMessage( "An exception occurred: #arguments.exception.message#" )
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error response exposes the raw arguments.exception.message directly to the client, which can leak internal details such as stack information, file paths, or database error messages. An attacker can intentionally trigger failures to harvest these messages and gain information useful for further attacks. Instead, return a generic, user-safe error message to clients and log the detailed exception message only on the server side.

Suggested change
.addMessage( "An exception occurred: #arguments.exception.message#" )
.addMessage( "An unexpected error occurred while processing your request." )

Copilot uses AI. Check for mistakes.
.setStatusCode( arguments.event.STATUS.INTERNAL_ERROR );
}

Expand Down
Loading