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();
|
||||
if ($isXhr && ! $this->isRedirect && $notifications->hasMessages()) {
|
||||
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
|
||||
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?
|
||||
if ($this->getParam('_render') === 'layout') {
|
||||
|
|
|
@ -287,6 +287,9 @@
|
|||
}
|
||||
|
||||
var notifications = req.getResponseHeader('X-Icinga-Notification');
|
||||
if (notifications) {
|
||||
notifications = decodeURIComponent(notifications);
|
||||
}
|
||||
|
||||
var target = req.getResponseHeader('X-Icinga-Container');
|
||||
var newBody = false;
|
||||
|
|
Loading…
Reference in New Issue