]> git.p6c8.net - jirafeau/pcanterino.git/commitdiff
Escape the disallowed extensions list in the upload form's onchange attribute
authorTehPeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com>
Sun, 18 Oct 2026 14:28:41 +0000 (16:28 +0200)
committerTehPeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com>
Sun, 18 Oct 2026 14:28:41 +0000 (16:28 +0200)
index.php

index c96657c15be93f186f4bf3f4962d587a1ac2526e..402e7845dab10acdfe6f350a93498a120fa34e26 100644 (file)
--- a/index.php
+++ b/index.php
@@ -137,7 +137,7 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) {
                 echo t('2_BIG') . ', ' . t('FILE_LIM') . " " . $cfg['maximal_upload_size'] . " MB.";
             }
 ?>'); control_selected_file_extension(<?php
-            echo json_encode(array_map('strtolower', $cfg['disallowed_extensions']));
+            echo jirafeau_escape(json_encode(array_map('strtolower', $cfg['disallowed_extensions'])));
 ?>, '<?php echo t('EXT_NOT_ALLOWED'); ?>.')"/>
     </p>
 

patrick-canterino.de