Summary | IMP - error logged for htmlspecialchars |
Queue | Horde Groupware Webmail Edition |
Queue Version | 4.0.3 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | horde (at) agotnes (dot) com |
Created | 10/08/2011 (5019 days ago) |
Due | |
Updated | 10/18/2011 (5009 days ago) |
Assigned | 10/10/2011 (5017 days ago) |
Resolved | 10/18/2011 (5009 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Assigned to Michael Slusarz
State ⇒ Resolved
dynamically changed based on the user's language selection.
So you have at least one user using a locale that uses a multibyte
thousands/decimal separator.
This is due to a PHP bug, and has been worked around as of IMP 5.0.14.
Bug #10618: Workaround broken number_format() for PHP < 5.4.05 files changed, 37 insertions(+), 17 deletions(-)
http://git.horde.org/horde-git/-/commit/122e04a55e1a452408764460bd22b2d345121c11
locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
I couldn't find anything locale related for either Horde or PHP (from
test.php / phpinfo) - if you let me know where to look I'm happy to...
This only seems to happen for some messages - not all of them, so
quite strange... I'm also happy to put in more debugging if you wish -
let me know what&where :)
of
"/var/www/www.agotnes.com/htdocs/horde4/imp/lib/Views/ListMessages.php"]
Oct 10 14:29:16 skadi HORDE4: [imp] PHP ERROR: htmlspecialchars():
Invalid multibyte sequence in argument [pid 21452 on line 450 of
"/var/www/www.agotnes.com/htdocs/horde4/imp/lib/Views/ListMessages.php"]
multibyte character? If so, I think we are running into a bug with
number_format() - according to documentation, before PHP 5.4, only the
first character of a separator is used. Thus, if a multibyte
character is being used, it will be chopped off after the first byte.
source of the issue - not sure providing the source of the message
will help but let me know based on this;
I added a bit of logging and found that this occurs when the user
opens their inbox, i.e. in listing the messages. One of the messages
has no 'size' information for the message which causes the issue when
viewed in DIMP and the following comes up in the log, note the
offending second line which likely contains a comma?;
I had a look and the message looks fine - anything further such as a
copy of the message? It is only a picture attached to an otherwise
empty email...
Oct 10 14:29:16 skadi HORDE4: [imp] 1,1 MB [pid 21452 on line 449 of
"/var/www/www.agotnes.com/htdocs/horde4/imp/lib/Views/ListMessages.php"]
Oct 10 14:29:16 skadi HORDE4: [imp] 1?019 KB [pid 21452 on line 449 of
"/var/www/www.agotnes.com/htdocs/horde4/imp/lib/Views/ListMessages.php"]
Oct 10 14:29:16 skadi HORDE4: [imp] PHP ERROR: htmlspecialchars():
Invalid multibyte sequence in argument [pid 21452 on line 450 of
"/var/www/www.agotnes.com/htdocs/horde4/imp/lib/Views/ListMessages.php"]
Oct 10 14:29:16 skadi HORDE4: [imp] 815 KB [pid 21452 on line 449 of
"/var/www/www.agotnes.com/htdocs/horde4/imp/lib/Views/ListMessages.php"]
State ⇒ Feedback
message with broken encoding. In other words, it is safely ignored.
Only way we can track this down further is if you can provide a sample
message that triggers this error.
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ IMP - error logged for htmlspecialchars
Queue ⇒ Horde Groupware Webmail Edition
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
specific user/email message but my users are using international
character sets (Norwegian);
HORDE4: [imp] PHP ERROR: htmlspecialchars(): Invalid multibyte
sequence in argument [pid 16678 on line 449 of
"/var/www/www.agotnes.com/htdocs/horde4/imp/lib/Views/ListMessages.php"]
happy to help debug further with some pointers as to where to start.
IMP5.0.13, Horde 4.0.9