mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 12:14:36 -05:00
With debug 0, Cake replaces a 500's message with a generic one, but Crud's exception renderer adds data.exception.message from the raw exception. A PDOException (e.g. monitors/index/<unknown column>:1.json) returned the SQL error and its fragment of the query to the client. data.url also echoed the request URL with its token or password. ZmExceptionRenderer extends Crud's renderer: with debug 0 a 5xx body carries the generic message in data.exception.message (class and code are kept), and data.url has credential values redacted. AppController::beforeFilter() swaps it in for the renderer Crud's ApiListener registers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>