Przeglądaj źródła

sanitizing folder name display.

tokul 21 lat temu
rodzic
commit
79e8f4cc82
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      functions/imap_mailbox.php

+ 2 - 2
functions/imap_mailbox.php

@@ -532,10 +532,10 @@ function sqimap_mailbox_option_list($imap_stream, $show_selected = 0, $folder_sk
                 switch ($shorten_box_names)
                 switch ($shorten_box_names)
                 {
                 {
                   case 2:   /* delimited, style = 2 */
                   case 2:   /* delimited, style = 2 */
-                    $box2 = str_replace('  ', '. ', $boxes_part['formatted']);
+                    $box2 = str_replace('  ', '. ', htmlspecialchars($boxes_part['formatted']));
                     break;
                     break;
                   case 1:   /* indent, style = 1 */
                   case 1:   /* indent, style = 1 */
-                    $box2 = $boxes_part['formatted'];
+                    $box2 = str_replace('  ', '  ', htmlspecialchars($boxes_part['formatted']));
                     break;
                     break;
                   default:  /* default, long names, style = 0 */
                   default:  /* default, long names, style = 0 */
                     $box2 = str_replace(' ', ' ', htmlspecialchars(imap_utf7_decode_local($boxes_part['unformatted-disp'])));
                     $box2 = str_replace(' ', ' ', htmlspecialchars(imap_utf7_decode_local($boxes_part['unformatted-disp'])));