]> git.p6c8.net - jirafeau/jirafeau.git/commitdiff
Prevent CSRF by using htmlspecialchars on header and footer.
authorDavi Torres <dtorres@simnet.ca>
Mon, 22 Jun 2026 15:03:44 +0000 (11:03 -0400)
committerDavi Torres <dtorres@simnet.ca>
Mon, 22 Jun 2026 15:03:44 +0000 (11:03 -0400)
lib/template/footer.php
lib/template/header.php

index 64132c70966c4a6e5e2b0f8943422a245608764d..fdf488afe8781e1e586876df861fbdccf5f84f97 100644 (file)
@@ -11,7 +11,7 @@
         if (false === empty($cfg['installation_done'])) {
             if(false === empty($cfg['organisation'])) {
                 echo ' <span>|</span> ';
-                echo ' ' . t('DESIGNED')  . ' ' .  $cfg['organisation'];
+                echo ' ' . t('DESIGNED')  . ' ' .  jirafeau_escape($cfg['organisation']);
             }
 
             echo ' <span>|</span> ';
index 93f7e1843d0f55c9025c81547b7eb45f42694bc4..c1a94de6ce01b124429b67b9009dd730c7a1ef94 100644 (file)
@@ -6,10 +6,10 @@ header('x-ua-compatible: ie=edge');
 <html>
 <head>
   <meta charset="utf-8">
-  <title><?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : $cfg['title']; ?></title>
+  <title><?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : jirafeau_escape($cfg['title']); ?></title>
   <meta name="viewport" content="width=device-width, initial-scale=1">
-  <link id="shortcut_icon" rel="shortcut icon" href="<?php echo 'media/' . $cfg['style'] . '/favicon.ico'; ?>">
-  <link id="stylesheet" rel="stylesheet" href="<?php echo 'media/' . $cfg['style'] . '/style.css.php'; ?>" type="text/css" />
+  <link id="shortcut_icon" rel="shortcut icon" href="<?php echo jirafeau_escape('media/' . $cfg['style'] . '/favicon.ico'); ?>">
+  <link id="stylesheet" rel="stylesheet" href="<?php echo jirafeau_escape('media/' . $cfg['style'] . '/style.css.php'); ?>" type="text/css" />
 </head>
 <body>
 <script type="text/javascript" src="<?php echo 'lib/functions.js.php'; ?>"></script>
@@ -17,6 +17,6 @@ header('x-ua-compatible: ie=edge');
 <div id="content">
   <h1>
     <a href="./">
-      <?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : $cfg['title']; ?>
+      <?php echo (true === empty($cfg['title'])) ? t('JI_WEB_RE') : jirafeau_escape($cfg['title']); ?>
     </a>
   </h1>

patrick-canterino.de