Skip to content

Commit 42f7c74

Browse files
committed
EventRulesController: Do not update col1 upon adding a rule
That's a remnant of a previous implementation. It causes two parallel requests, both access and update the session. The last request updating the session overrides the changes of the other and in case of xDebug being disabled or inactive the timing of the requests is different, hence I did not notice this prior. So the actual problem is not solved… fixes #355
1 parent 26ae608 commit 42f7c74

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

application/controllers/EventRulesController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ public function addAction(): void
102102
->populate(['id' => -1])
103103
->setCsrfCounterMeasureId(Session::getSession()->getId())
104104
->setAction(Url::fromRequest()->getAbsoluteUrl())
105-
->on(Form::ON_SUCCESS, function ($form) {
106-
$this->sendExtraUpdates(['#col1']);
105+
->on(Form::ON_SUBMIT, function ($form) {
107106
$this->getResponse()->setHeader('X-Icinga-Container', 'col2');
108107
$this->redirectNow(Links::eventRule(-1)->addParams(['name' => $form->getValue('name')]));
109108
})->handleRequest($this->getServerRequest());

0 commit comments

Comments
 (0)