From ba9a633b735905fe319fbc439aa8e818b58a82e8 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 23 Jun 2014 13:21:44 +0200 Subject: [PATCH] Web\Form: relax form submission check We have to live with some badly designed forms right now. Some have submit buttons but don't know about, others don't have such but link to foreign controllers fiddling with the form and adding different button AFTER the form got submitted - it's a mess. Relaxing the submission check to "just check whether btn_submit has a value" fixes most of this. However I do not consider this being a solution for the long run. fixes #6423 fixes #5967 refs #6540 --- library/Icinga/Web/Form.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index 328de50de..08a621b6c 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -456,10 +456,8 @@ class Form extends Zend_Form if ($this->submitLabel) { $checkData = $this->getRequest()->getParams(); - $label = isset($checkData['btn_submit']) ? $checkData['btn_submit'] : null; - return $label === $this->submitLabel; + return isset($checkData['btn_submit']) && $checkData['btn_submit']; } - return true; }