From 286c84fab0047726a6a396ceefaae1bb666fc485 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 6 Jun 2023 15:52:16 -0400 Subject: [PATCH] fix: [layout:title] Make sure page title are correctly formatted --- app/View/CorrelationExclusions/top_correlations.ctp | 2 +- app/View/Correlations/over_correlations.ctp | 2 +- app/View/Correlations/top.ctp | 2 +- app/View/Layouts/Emails/html/default.ctp | 2 +- app/View/Layouts/default.ctp | 2 +- app/View/Layouts/error.ctp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/View/CorrelationExclusions/top_correlations.ctp b/app/View/CorrelationExclusions/top_correlations.ctp index ea6f6c13f..14982404f 100644 --- a/app/View/CorrelationExclusions/top_correlations.ctp +++ b/app/View/CorrelationExclusions/top_correlations.ctp @@ -28,7 +28,7 @@ 'data_path' => 'Correlation.count' ] ], - 'title' => empty($ajax) ? $title_for_layout : false, + 'title' => empty($ajax) ? h($title_for_layout) : false, 'description' => empty($ajax) ? __('The values with the most correlation entries.') : false, 'pull' => 'right', 'actions' => [ diff --git a/app/View/Correlations/over_correlations.ctp b/app/View/Correlations/over_correlations.ctp index 8b68383f1..1d2ad6b95 100644 --- a/app/View/Correlations/over_correlations.ctp +++ b/app/View/Correlations/over_correlations.ctp @@ -63,7 +63,7 @@ echo $this->element('genericElements/IndexTable/index_table', [ 'element' => 'boolean' ] ], - 'title' => empty($ajax) ? $title_for_layout : false, + 'title' => empty($ajax) ? h($title_for_layout) : false, 'description' => empty($ajax) ? __('The values with the most correlation entries.') : false, 'pull' => 'right', 'actions' => [ diff --git a/app/View/Correlations/top.ctp b/app/View/Correlations/top.ctp index 1176f32d0..00c681dab 100644 --- a/app/View/Correlations/top.ctp +++ b/app/View/Correlations/top.ctp @@ -43,7 +43,7 @@ 'class' => 'shortish' ] ], - 'title' => empty($ajax) ? $title_for_layout : false, + 'title' => empty($ajax) ? h($title_for_layout) : false, 'description' => empty($ajax) ? __('The values with the most correlation entries.') : false, 'pull' => 'right', 'actions' => [ diff --git a/app/View/Layouts/Emails/html/default.ctp b/app/View/Layouts/Emails/html/default.ctp index bab97d110..243dece79 100644 --- a/app/View/Layouts/Emails/html/default.ctp +++ b/app/View/Layouts/Emails/html/default.ctp @@ -19,7 +19,7 @@ - <?php echo $title_for_layout;?> + <?php echo h($title_for_layout);?> fetch('content');?> diff --git a/app/View/Layouts/default.ctp b/app/View/Layouts/default.ctp index e9dadf3e0..886b1cff2 100644 --- a/app/View/Layouts/default.ctp +++ b/app/View/Layouts/default.ctp @@ -5,7 +5,7 @@ - <?= $title_for_layout, ' - ', h(Configure::read('MISP.title_text') ?: 'MISP') ?> + <?= h($title_for_layout), ' - ', h(Configure::read('MISP.title_text') ?: 'MISP') ?> true]], diff --git a/app/View/Layouts/error.ctp b/app/View/Layouts/error.ctp index 75aa10050..89f37722e 100644 --- a/app/View/Layouts/error.ctp +++ b/app/View/Layouts/error.ctp @@ -24,7 +24,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework Html->charset(); ?> <?php echo $cakeDescription ?>: - <?php echo $title_for_layout; ?> + <?php echo h($title_for_layout); ?> Html->meta('icon');