[wp-trac] [WordPress Trac] #3568: class-pop3.php does not always correctly read till end-of-mail on mail server
WordPress Trac
noreply at wordpress.org
Mon Feb 12 06:06:54 UTC 2024
#3568: class-pop3.php does not always correctly read till end-of-mail on mail
server
----------------------------+----------------------
Reporter: fix22 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Administration | Version: 2.0.5
Severity: normal | Resolution: invalid
Keywords: | Focuses:
----------------------------+----------------------
Comment (by skillidk5):
It seems you've identified a bug in the standard WordPress code,
specifically in the class-pop3.php file located in /wp-includes/. The
issue arises when the script fails to correctly read until the end-of-mail
on the mail server, causing problems with deleting messages.
To address this, you've suggested replacing the line:
```
while ( !ereg("\.\r\n",$line))
```
with:
```
while (!feof($fp))
```
This change allows the script to properly handle end-of-mail conditions
and prevent issues with message deletion. You've also provided a test to
verify if this change resolves the problem.
It's essential to report this issue to the WordPress developers to ensure
it gets fixed in future releases. Your detailed investigation and proposed
solution will be valuable in resolving this issue.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/3568#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list