Return 404 to hide 403's or 5xx's #13

Open
opened 2026-05-27 07:08:34 +02:00 by c.fahner · 0 comments
Owner

Currently, resources are free to return 403 or 5xx status codes when a permission error or internal error occurs. In production this would reveal information to a potential attacker.

The Resource\Handler should instead cast these status codes to generic 404 responses by default. Only when "debug mode" has been disabled from the configs or when the Resource has been explicitly marked as "public use" should the real response be shown.

Currently, resources are free to return 403 or 5xx status codes when a permission error or internal error occurs. In production this would reveal information to a potential attacker. The `Resource\Handler` should instead cast these status codes to generic 404 responses by default. Only when "debug mode" has been disabled from the configs or when the `Resource` has been explicitly marked as "public use" should the real response be shown.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
slendium/framework#13
No description provided.