The following endpoints never call ini_set('display_errors', 0), relying entirely on the server's global php.ini setting: api/assign_ticket.php, api/audit_log.php, api/bulk_operation.php, api/check_duplicates.php, api/download_attachment.php, api/get_comments.php, api/get_template.php, api/get_users.php, api/health.php, api/notifications.php, api/saved_filters.php, api/user_preferences.php, api/watch_ticket.php.
The other 20 endpoints explicitly disable it. An uncaught error/warning in one of these 13 (e.g. a DB connection hiccup before any try/catch is entered) can leak a stack trace with internal file paths straight into the JSON/HTML response if the server's display_errors ini default is ever On.
Fix: Add ini_set('display_errors', 0); error_reporting(E_ALL); to the top of these 13 files, matching the pattern used everywhere else — or better, centralize this in a bootstrap include (see the related ErrorHandler.php rollout issue) so it can't be missed on new endpoints.
**Severity:** Medium
The following endpoints never call `ini_set('display_errors', 0)`, relying entirely on the server's global `php.ini` setting: `api/assign_ticket.php`, `api/audit_log.php`, `api/bulk_operation.php`, `api/check_duplicates.php`, `api/download_attachment.php`, `api/get_comments.php`, `api/get_template.php`, `api/get_users.php`, `api/health.php`, `api/notifications.php`, `api/saved_filters.php`, `api/user_preferences.php`, `api/watch_ticket.php`.
The other 20 endpoints explicitly disable it. An uncaught error/warning in one of these 13 (e.g. a DB connection hiccup before any try/catch is entered) can leak a stack trace with internal file paths straight into the JSON/HTML response if the server's `display_errors` ini default is ever `On`.
**Fix:** Add `ini_set('display_errors', 0); error_reporting(E_ALL);` to the top of these 13 files, matching the pattern used everywhere else — or better, centralize this in a bootstrap include (see the related ErrorHandler.php rollout issue) so it can't be missed on new endpoints.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Medium
The following endpoints never call
ini_set('display_errors', 0), relying entirely on the server's globalphp.inisetting:api/assign_ticket.php,api/audit_log.php,api/bulk_operation.php,api/check_duplicates.php,api/download_attachment.php,api/get_comments.php,api/get_template.php,api/get_users.php,api/health.php,api/notifications.php,api/saved_filters.php,api/user_preferences.php,api/watch_ticket.php.The other 20 endpoints explicitly disable it. An uncaught error/warning in one of these 13 (e.g. a DB connection hiccup before any try/catch is entered) can leak a stack trace with internal file paths straight into the JSON/HTML response if the server's
display_errorsini default is everOn.Fix: Add
ini_set('display_errors', 0); error_reporting(E_ALL);to the top of these 13 files, matching the pattern used everywhere else — or better, centralize this in a bootstrap include (see the related ErrorHandler.php rollout issue) so it can't be missed on new endpoints.