浏览代码

Fixes XSS bug in mailbox_display with malicious From: headers.
Thanks to sailfrog for finding this one!

tassium 22 年之前
父节点
当前提交
5e5cc2c2bc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      functions/mailbox_display.php

+ 1 - 1
functions/mailbox_display.php

@@ -155,7 +155,7 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
                 break;
             case 2: /* from */
                 echo html_tag( 'td',
-                               $italic . $bold . $flag . $fontstr . $senderName .
+                               $italic . $bold . $flag . $fontstr . htmlentities($senderName) .
                                $fontstr_end . $flag_end . $bold_end . $italic_end,
                                'left',
                                $hlt_color );