Bug Report #1273
View->render doesn't handle exceptions gracefully
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | Libraries | |||
| Target version: | 2.3.3 | |||
| Resolution: | Points: |
Description
The problem really lies within Controller->_kohana_load_view. If the view throws an exception, the output buffer is not properly closed so the output echoed before the exception can get flushed which may not be desired (e.g. if you are rendering an XML RPC with sensitive information). This patch simply wraps the include in a try/catch and closes the buffer if an exception is thrown and then rethrows the exception.
Associated revisions
Fixes #1273. Wraps the include statement in try catch, catch cleans the output buffer and then re-throws the error
History
Updated by Chris Bandy over 2 years ago
Agreed. The output buffer must be cleaned up when leaving this function.
Updated by Sam de Freyssinet over 2 years ago
- Status changed from New to Assigned
- Assignee set to Sam de Freyssinet
Updated by Sam de Freyssinet over 2 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
Applied in changeset r4365.