瀏覽代碼

workaround for SELECT problem

Luke Ehresman 24 年之前
父節點
當前提交
176b2bcb4e
共有 1 個文件被更改,包括 11 次插入3 次删除
  1. 11 3
      src/compose.php

+ 11 - 3
src/compose.php

@@ -389,6 +389,14 @@
       }
       }
     }
     }
 
 
+   $mailbox = trim($mailbox);
+   $send_to = trim($send_to);
+   $send_to_cc = trim($send_to_cc);
+   $send_to_bcc = trim($send_to_bcc);
+   $subject = trim($subject);
+   $body = trim($body);
+   $attachfile = trim($attachfile);
+   
    if (!isset($mailbox) || $mailbox == "" || ($mailbox == "None"))
    if (!isset($mailbox) || $mailbox == "" || ($mailbox == "None"))
       $mailbox = "INBOX";
       $mailbox = "INBOX";
 
 
@@ -398,9 +406,9 @@
           $HTTP_POST_FILES['attachfile']['tmp_name'] != 'none')
           $HTTP_POST_FILES['attachfile']['tmp_name'] != 'none')
           $AttachFailure = saveAttachedFiles();
           $AttachFailure = saveAttachedFiles();
       if (checkInput(false) && ! isset($AttachFailure)) {
       if (checkInput(false) && ! isset($AttachFailure)) {
-         $urlMailbox = urlencode ($mailbox);
-	 if (! isset($reply_id))
-	     $reply_id = 0;
+         $urlMailbox = urlencode (trim($mailbox));
+         if (! isset($reply_id))
+             $reply_id = 0;
          sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id);
          sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id);
          header ("Location: right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=1");
          header ("Location: right_main.php?mailbox=$urlMailbox&sort=$sort&startMessage=1");
       } else {
       } else {