ObjectController: hard exit after REST API response

fixes #1314
This commit is contained in:
Thomas Gelf 2018-09-05 22:27:07 +02:00
parent fbef8866ce
commit e853dc40fc
2 changed files with 9 additions and 0 deletions

View File

@ -25,6 +25,9 @@ master (will be 1.6.0)
### Configuration rendering
* FIX: Fix compatibility with Icinga v2.6, got broken with v1.5.0 (#1614)
### REST API
* FIX: No more invalid JSON in some special circumstances (#1314)
1.5.1
-----
### Fixed issues

View File

@ -59,6 +59,12 @@ abstract class ObjectController extends ActionController
$handler->setObject($this->object);
}
$handler->dispatch();
// Hint: also here, hard exit. There is too much magic going on.
// Letting this bubble up smoothly would be "correct", but proved
// to be too fragile. Web 2, all kinds of pre/postDispatch magic,
// different view renderers - hard exit is the only safe bet right
// now.
exit;
} else {
$this->eventuallyLoadObject();
if ($this->getRequest()->getActionName() === 'add') {