6.0.0-beta1
7/4/25

[#10497] Invalid UTF-8 sequence in argument ... /usr/share/php/Horde/Prefs/Scope.php
Summary Invalid UTF-8 sequence in argument ... /usr/share/php/Horde/Prefs/Scope.php
Queue IMP
Queue Version 5.0.11
Type Bug
State Duplicate
Priority 1. Low
Owners
Requester szimszon (at) oregpreshaz (dot) eu
Created 09/09/2011 (5047 days ago)
Due
Updated 10/04/2011 (5022 days ago)
Assigned
Resolved 10/04/2011 (5022 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/04/2011 06:37:44 AM Michael Slusarz Comment #11
State ⇒ Duplicate
Reply to this comment
Duplicate of Bug #10602.
09/12/2011 08:34:28 PM szimszon (at) oregpreshaz (dot) eu Comment #10 Reply to this comment
so, I have it...

horde need to sanitize the input from pkcs12 files. Mozilla exports 
the keys with some additional text. And the text is in the language 
like the thunderbird or firefox itself...
One possible solution is that only use and store the ----- BEGIN... 
...END ----- part and exclude all the other text.
Actually the wrong text is coming from the Hungarian Thunderbird...
09/12/2011 08:12:22 PM szimszon (at) oregpreshaz (dot) eu Comment #9 Reply to this comment
Actually the wrong text is coming from the Hungarian Thunderbird...
09/12/2011 11:32:57 AM szimszon (at) oregpreshaz (dot) eu Comment #8 Reply to this comment
I see some text coming from openssl binary... It is running in 
hu_HU.UTF-8 locale. Could it be that running openssl in different 
locale like hu_HU.UTF-8 and not en_US... cause problems with it.

There is some text from openssl binary in db with wrong encoding 
too... (clean install, clean mysql db, no update no data)

Can't sign mail. can't see the imported ssl key no hint that I 
imported it. Can't encrypt mail... :(

[Show Quoted Text - 27 lines]
09/12/2011 11:19:12 AM szimszon (at) oregpreshaz (dot) eu Comment #7 Reply to this comment
Hm... There are a lot of "PHP ERROR: json_encode(): Invalid UTF-8 
sequence in argument" in the log :(
but I think now that the ssl sign and encrypt are not because the 
json_encode() broken :(

[Show Quoted Text - 21 lines]
09/12/2011 10:06:34 AM szimszon (at) oregpreshaz (dot) eu Comment #6 Reply to this comment
OKAY, clean install, without a preexistent db but with mysql:

           um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
           NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14= -----END 
CERTIFICATE-----') [pid 20396 on line 801 of 
"/var/www/horde/pear/php/Horde/Db/Adapter/Base.php"]
2011-09-12T12:01:56+02:00 WARN: HORDE [imp] PHP ERROR: json_encode(): 
Invalid UTF-8 sequence in argument [pid 20396 on line 289 of 
"/var/www/horde/pear/php/H
orde/Prefs/Scope.php"]
2011-09-12T12:01:56+02:00 DEBUG: HORDE 1. Horde_Prefs->store()
2. Horde_Core_Prefs_Cache_Session->store() 
/var/www/horde/pear/php/Horde/Prefs.php:396
3. Horde_Session->set() 
/var/www/horde/pear/php/Horde/Core/Prefs/Cache/Session.php:34
4. serialize() /var/www/horde/pear/php/Horde/Session.php:334
5. Horde_Prefs_Scope->serialize()
6. json_encode() /var/www/horde/pear/php/Horde/Prefs/Scope.php:289
7. Horde::errorHandler()

Something is definitely wrong with it...
09/12/2011 08:20:03 AM szimszon (at) oregpreshaz (dot) eu Comment #5 Reply to this comment
hm... seems like Whups is haunted with encoding problems too :(

The "Árvízt?r?"  string is '   Árvíztu"ro"   '.  It's some kind of 
utf-8 error...

[Show Quoted Text - 34 lines]
09/12/2011 08:13:47 AM szimszon (at) oregpreshaz (dot) eu Comment #4 Reply to this comment
Yes i upgraded it from previous version. I have now the DB (pgsql):

             Name                   |    Owner   | Encoding  | 
Collation | Ctype |   Access privileges
hordewebmail                | horde       | UTF8      | C         | C     |

What webmail-install asked charset is utf-8...

So if I make a new contact like "Árvízt?r? Tükörfúrógép" in turba I 
can search for it and I can see it with proper encoding... In the db 
dumb I see "Árvízt?r? Tükörfúrógép" too...

But if I impot my key file I see what is like unicode or so:

"Bag A\\164\\164rib\\165\\164es\\012    friendl\\171Name: 
s\\172ims\\172on@oregpresha\\172.e\\165 S\\164ar\\164Com L\\164d. 
a\\172onos\\355\\164\\363ja\\012    localKe\\171ID: AF 76 8E 36 37 78 
4A 4D 1D 34 09 69 A1 28 05 AE 18 02 62 62 \\012Ke\\171 
A\\164\\164rib\\165\\164es: <No 
A\\164\\164rib\\165\\164es>\\012-----BEGIN RSA PRIVATE 
KEY-----\\012Proc-T\\171pe: 4,ENCRYPTED\\012DEK-Info: 
DES-EDE3-CBC,513EC7D887C811DF\\012\\012BENCZY\\167jE29b\\170KqcmdI1OOaDPHrZ/s+1CT7XjQsZ6c\\1679AmlU2DdFBX/9OihNGYNK\\012r\\166CcjXa1ocgqXd\\1677eeY\\17232XATKA3Pm\\165fjYrApMh8YN9maXRD\\167\\172F\\166\\172ZjNmBb/"

So it seems to me that is not an encoding error in db side...
         4=\\012-----END CERTIFICATE-----') [pid 21062 on line 801 of
"/usr/share/php/Horde/Db/Adapter/Base.php"]
Did you upgrade from a previous version of Horde?  At first glance 
it looks like you did not properly upgrade your SQL backend charset. 
  But I'm not the DB expert.
09/12/2011 12:10:27 AM Michael Slusarz Comment #3
Priority ⇒ 1. Low
Reply to this comment
         4=\\012-----END CERTIFICATE-----') [pid 21062 on line 801 of 
"/usr/share/php/Horde/Db/Adapter/Base.php"]
Did you upgrade from a previous version of Horde?  At first glance it 
looks like you did not properly upgrade your SQL backend charset.  But 
I'm not the DB expert.
09/11/2011 07:51:39 PM szimszon (at) oregpreshaz (dot) eu Comment #2 Reply to this comment
09/09/2011 11:14:27 PM szimszon (at) oregpreshaz (dot) eu Comment #1
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ IMP
Summary ⇒ Invalid UTF-8 sequence in argument ... /usr/share/php/Horde/Prefs/Scope.php
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
Hello!

I wonder if somebody could help me.

I got in debugging log that after I try to import my own ssl email 
certificate:


         4=\\012-----END CERTIFICATE-----') [pid 21062 on line 801 of 
"/usr/share/php/Horde/Db/Adapter/Base.php"]
2011-09-10T00:52:47+02:00 WARN: HORDE [imp] PHP ERROR: json_encode() 
[<a href='function.json-encode'>function.json-encode</a>]: Invalid 
UTF-8 sequence in argument [pid 21062 on line 289 of 
"/usr/share/php/Horde/Prefs/Scope.php"]
2011-09-10T00:52:47+02:00 DEBUG: HORDE 1. Horde_Prefs->store()
2. Horde_Core_Prefs_Cache_Session->store() /usr/share/php/Horde/Prefs.php:396
3. Horde_Session->set() /usr/share/php/Horde/Core/Prefs/Cache/Session.php:34
4. serialize() /usr/share/php/Horde/Session.php:334
5. Horde_Prefs_Scope->serialize()
6. json_encode() /usr/share/php/Horde/Prefs/Scope.php:289
7. Horde::errorHandler()

Saved Queries