]> git.p6c8.net - jirafeau/jirafeau.git/blobdiff - install.php
Also hooking regex on script.php
[jirafeau/jirafeau.git] / install.php
index ed99b19208642655512375150c34ca990633cde9..808aad75d0e12a73fe7b4b6c3d236e62b8dd226a 100644 (file)
@@ -2,7 +2,8 @@
 /*
  *  Jirafeau, your web file repository
  *  Copyright (C) 2008  Julien "axolotl" BERNARD <axolotl@magieeternelle.org>
- *  Copyright (C) 2015  Nicola Spanti (RyDroid) <dev@nicola-spanti.info>
+ *  Copyright (C) 2015  Jerome Jutteau <jerome@jutteau.fr>
+ *  Copyright (C) 2024  Jirafeau project <https://gitlab.com/jirafeau> (see AUTHORS.md)
  *
  *  This program is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU Affero General Public License as
@@ -138,7 +139,7 @@ break;
         ?></label></td>
         <td class = "field"><input type = "text" name = "web_root"
         id = "input_web_root" value = "<?php
-               echo(empty($cfg['web_root']) ? jirafeau_default_web_root() : $cfg['web_root']);
+               echo htmlspecialchars(empty($cfg['web_root']) ? jirafeau_default_web_root() : $cfg['web_root'], ENT_QUOTES);
         ?>" size = "40" /></td>
         </tr> <tr> <td class = "info" colspan = "2"><?php
           echo t('DATA_DIR_EXPLAINATION');
@@ -152,12 +153,12 @@ break;
           'abcdefghijklmnopqrstuvwxyz' . '0123456789';
                 $len_alphanum = strlen($alphanum);
                 $var = 'var-';
-                for ($i = 0; $i <JIRAFEAU_VAR_RAND_LENGTH; $i++) {
+                for ($i = 0; $i < JIRAFEAU_VAR_RAND_LENGTH; $i++) {
                     $var .= substr($alphanum, mt_rand(0, $len_alphanum - 1), 1);
                 }
                 echo JIRAFEAU_ROOT . $var . '/';
             } else {
-                echo $cfg['var_root'];
+                echo htmlspecialchars($cfg['var_root'], ENT_QUOTES);
             }
         ?>" size = "40" /></td>
         </tr> <tr> <td colspan = "2"><input type = "submit"

patrick-canterino.de