WordPress.org

Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #3568

Timestamp:
01/12/07 18:20:10 (6 years ago)
Author:
foolswisdom
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3568

    • Property Severity changed from critical to major
    • Property Milestone changed from 2.2 to 2.1
  • Ticket #3568 – Description

    initial v3  
    55Also - You need to do the same for the $content variable too if you haven't done that: 
    66 
    7 preg_replace("/'/","\\'",$content), 
     7 preg_replace("/'/","\\'",$content), 
    88 
    99I still had the issue on [http://advertising-info.org/ advertising-info.org] so I started throubleshooting some more. It has cost me about 10 hours to find what the issue was. Finally I found it (it's a bug in the standard wordpress code and it is up to 2.0.5 so I got to report this to the wp coders as well): 
     
    1111In class-pop3.php (in /wp-includes/) there is the following line in the function "get": 
    1212 
    13 while ( !ereg("^\.\r\n",$line)) 
     13 while ( !ereg("^\.\r\n",$line)) 
    1414 
    1515This is incorrect! What happens I think is the following: if a certain message had a "." on a newline (I think this may happen for instance if the "." was just cut-off by the the max lenght of the line and was therefore placed on the next line, or when someone just placed a dot on a line and then a \r\n return/newline.) 
     
    1717To fix this issue: swap the above to this: 
    1818 
    19 while (!feof($fp)) 
     19 while (!feof($fp)) 
    2020 
    2121While in fact this will not do much (I do not think that the mail server will actually report an end-of-file) the following piece of the "get" function will now kick-in; 
    2222 
    23 if(empty($line)) { break; } 
     23 if(empty($line)) { break; } 
    2424 
    2525And stop reading from the mail server when the end of the message was reached. 
     
    3030 
    3131If you want to test for yourself if this is the issue you are having, simply change the code in class-pop3.php to the following: 
    32  
     32{{{ 
    3333while (!feof($fp)) 
    3434{ 
     
    4242break; } 
    4343} 
    44  
     44}}} 
    4545This will output all the lines while reading from the mail server (you can see the output of this by manually runing postie from the options in WP) 
    4646