diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index f8b53f95..91860f8d 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -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 diff --git a/library/Director/Web/Controller/ObjectController.php b/library/Director/Web/Controller/ObjectController.php index 2e3e7f21..73ae7ae6 100644 --- a/library/Director/Web/Controller/ObjectController.php +++ b/library/Director/Web/Controller/ObjectController.php @@ -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') {