Skip to content

Commit

Permalink
fix: [security] Fix to a reflected XSS in the default layout template
Browse files Browse the repository at this point in the history
- as reported by Tuscany Internet eXchange | Misp Team | TIX CyberSecurity
  • Loading branch information
iglocska committed Mar 28, 2019
1 parent 823ea74 commit 586cca3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/View/Layouts/default.ctp
Expand Up @@ -101,9 +101,9 @@
var baseurl = '<?php echo $baseurl; ?>';
var here = '<?php
if (substr($this->params['action'], 0, 6) === 'admin_') {
echo $baseurl . '/admin/' . $this->params['controller'] . '/' . substr($this->params['action'], 6);
echo $baseurl . '/admin/' . h($this->params['controller']) . '/' . h(substr($this->params['action'], 6));
} else {
echo $baseurl . '/' . $this->params['controller'] . '/' . $this->params['action'];
echo $baseurl . '/' . h($this->params['controller']) . '/' . h($this->params['action']);
}
?>';
$(document).ready(function(){
Expand Down

0 comments on commit 586cca3

Please sign in to comment.