6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
10/17/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#14522] Invalid UTF-8 session data gets passed to json_encode()
*
Your Email Address
*
Spam protection
Enter the letters below:
__..___.. . __.. , (__ _/ | |(__ \./ .__)./__.|/\|.__) |
Comment
> Have had these PHP errors in syslog for ages on my horde-5.2.16 > webmail installation (and previous versions): > > PHP ERROR: json_encode(): Invalid UTF-8 sequence in argument [pid > 30552 on line 48 of ".../pear/php/Horde/Pack/Driver/Json.php"] > > I finally decided to dig into it and find if the cause is a local > problem or systematic. Confirmed, a 44-byte binary (non UTF-8) > string gets passed to json_encode(). > > I could get a backtrace: > '#0 /var/www/sites/horde5.ptaff.ca/pear/php/Horde/Pack.php(130): > Horde_Pack_Driver_Json->pack(Array) > #1 /var/www/sites/horde5.ptaff.ca/pear/php/Horde/Session.php(430): > Horde_Pack->pack(Array, Array) > #2 /var/www/sites/horde5.ptaff.ca/pear/php/Horde/Registry.php(2458): > Horde_Session->set(\'horde\', \'auth_app/gollem\', Array, 4) > #3 /var/www/sites/horde5.ptaff.ca/pear/php/Horde/Registry.php(2581): > Horde_Registry->setAuthCredential(Array, NULL, \'gollem\') > > It thus seems like a regression happened with that commit: > https://github.com/horde/horde/commit/54a1644952151bea3dc942e0b334e07810e9e188 > > Where PHP's serialize() would be happy to be fed binary data, and > json_encode() is not. > > Not sure about the right approach here to fix this as JSON's not > designed to handle raw binary data. >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers