-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date parsing hangs with certain malformed headers #6087
Comments
What PHP version? Could you provide a sample message? |
php 5.4.45 i added a bunch of trace logging, and it was the date parsing call that it would get stuck at - the string it passes is the date plus a huge list of email addresses, all separated by space (from the header folding) message attached. it's pretty extreme with the number of email addresses in the headers. |
Thanks. This was a very long running loop in rcube_utils::strtotime(). I think my fix is slightly better, but I will also add some checks in rcube_imap_generic::fetch(). |
fixing it in rcube_utils seems like the better way to go. :) |
Where we know what expected data length is we truncate the input.
Somehow a user ended up with a message with headers like:
To: [email protected],
[email protected],
[email protected],
Date: 16 Sep 2015 12:03:32 +0100
[email protected],
[email protected],
When roundcube tries to call list_messages on the message set containing this message, the process hangs (in my case, the php-fpm process eventually times out, not sure what happens with php as a module).
Ideally, roundcube would gracefully handle this condition.
The text was updated successfully, but these errors were encountered: