mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Encoding: no ASCII chars > 127 in HTTP headers
Had quite some trouble with this, decided to URL-encode titles and notifications.
This commit is contained in:
parent
b0b2d21751
commit
88460189cd
@ -420,7 +420,7 @@ class ActionController extends Zend_Controller_Action
|
|||||||
$notifications = Notification::getInstance();
|
$notifications = Notification::getInstance();
|
||||||
if ($isXhr && ! $this->isRedirect && $notifications->hasMessages()) {
|
if ($isXhr && ! $this->isRedirect && $notifications->hasMessages()) {
|
||||||
foreach ($notifications->getMessages() as $m) {
|
foreach ($notifications->getMessages() as $m) {
|
||||||
header('X-Icinga-Notification: ' . $m->type . ' ' . $m->message);
|
header('X-Icinga-Notification: ' . rawurlencode($m->type . ' ' . $m->message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,7 +442,7 @@ class ActionController extends Zend_Controller_Action
|
|||||||
// TODO: Innocent exception and error log for hack attempts
|
// TODO: Innocent exception and error log for hack attempts
|
||||||
throw new Exception('No way, guy');
|
throw new Exception('No way, guy');
|
||||||
}
|
}
|
||||||
header('X-Icinga-Title: ' . $this->view->title . ' :: Icinga Web');
|
header('X-Icinga-Title: ' . rawurlencode($this->view->title . ' :: Icinga Web'));
|
||||||
}
|
}
|
||||||
// TODO: _render=layout?
|
// TODO: _render=layout?
|
||||||
if ($this->getParam('_render') === 'layout') {
|
if ($this->getParam('_render') === 'layout') {
|
||||||
|
@ -287,6 +287,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
var notifications = req.getResponseHeader('X-Icinga-Notification');
|
var notifications = req.getResponseHeader('X-Icinga-Notification');
|
||||||
|
if (notifications) {
|
||||||
|
notifications = decodeURIComponent(notifications);
|
||||||
|
}
|
||||||
|
|
||||||
var target = req.getResponseHeader('X-Icinga-Container');
|
var target = req.getResponseHeader('X-Icinga-Container');
|
||||||
var newBody = false;
|
var newBody = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user