]> git.p6c8.net - jirafeau/pcanterino.git/commitdiff
More character scaping on indes and install.
authorDavi Torres <dtorres@simnet.ca>
Mon, 22 Jun 2026 15:08:17 +0000 (11:08 -0400)
committerDavi Torres <dtorres@simnet.ca>
Mon, 22 Jun 2026 15:08:17 +0000 (11:08 -0400)
index.php
install.php

index 4881c51517a29d050153513f24ac7fe3876ccade..74c68a059aeb79e83cb90076b7c13062475f37c2 100644 (file)
--- a/index.php
+++ b/index.php
@@ -158,7 +158,7 @@ if ($cfg['download_password_requirement'] === 'generated') {
     echo '<tr><td><label for="input_key">' . t('PSW') . ':' . '</label></td>';
     echo '<td><input type="password" name="key" id="input_key" autocomplete = "new-password"';
     if ($cfg['download_password_policy'] === 'regex') {
-        echo ' pattern="' . substr($cfg['download_password_policy_regex'], 1, strlen($cfg['download_password_policy_regex']) - 2) . '"'; //remove php delimiters
+        echo ' pattern="' . jirafeau_escape(substr($cfg['download_password_policy_regex'], 1, strlen($cfg['download_password_policy_regex']) - 2)) . '"'; //remove php delimiters
     }
     if ($cfg['download_password_requirement'] === 'required') {
         echo ' required';
index ebda6f566af9d0de581c5a102101eac03687881e..808aad75d0e12a73fe7b4b6c3d236e62b8dd226a 100644 (file)
@@ -139,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');
@@ -158,7 +158,7 @@ break;
                 }
                 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