Issue 701 - Pluf_Log_File cannot cope with non-utf8 data (pluf)

0 views
Skip to first unread message

no-r...@ceondo.com

unread,
Jun 15, 2011, 6:33:35 AM6/15/11
to pluf-u...@googlegroups.com
Hello,

A new issue has been created and assigned
to you:

701 - Pluf_Log_File cannot cope with non-utf8 data
Project: Pluf Framework
Status: New
Reported by: Thomas Keller
Labels:
Priority:Medium
Type:Defect

Description:

The error is:

json_encode(): Invalid UTF-8 sequence in argument
pluf-master/src/Pluf/Log/File.php, line 54

The byte sequence that lead to this error was (output of od -c):

0000100 < 300 344 354 350 355 350 361 362 360 340 362 356 360 @ .
0000120 ( n o n e ) > \n D a t e :

I think something along the line of this is needed:

http://trac.roundcube.net/browser/trunk/roundcubemail/program/include/rcube_shared.inc#L536

--
Issue: http://projects.ceondo.com/p/pluf/issues/701/


no-r...@ceondo.com

unread,
Aug 3, 2012, 11:31:40 AM8/3/12
to pluf-u...@googlegroups.com
Hello,

The following issue has been updated:

701 - Pluf_Log_File cannot cope with non-utf8 data
Project: Pluf Framework
Status: New
Reported by: Thomas Keller
URL: http://projects.ceondo.com/p/pluf/issues/701/
Labels:
Priority:Medium
Type:Defect

Comments (last first):

# By Mateus Caruccio, Aug 3, 2012:

Hi, same problem here.

In my case, an invalid utf-8 log message cause an exception when json_encode() is call.

Attached is a patch to convert everything to utf-8 prior passing it to json_encode().

Work for me ;) Hope someone review it and apply to Pluf.

Regards,
Mateus Caruccio

Attachments:
- fix-invalid-utf-8-log-message.patch - 1.25 kB
http://projects.ceondo.com/p/pluf/issues/view/attachment/320/fix-invalid-utf-8-log-message.patch


# By Thomas Keller, Jun 15, 2011:

no-r...@ceondo.com

unread,
Aug 3, 2012, 11:32:59 AM8/3/12
to pluf-u...@googlegroups.com
Hello,

The following issue has been updated:

701 - Pluf_Log_File cannot cope with non-utf8 data
Project: Pluf Framework
Status: New
Reported by: Thomas Keller
URL: http://projects.ceondo.com/p/pluf/issues/701/
Labels:
Priority:Medium
Type:Defect

Comments (last first):

# By Mateus Caruccio, Aug 3, 2012:

BTW, log messages should never ever ever crash the entire system. Better not log at all, but keep the system online.

# By Mateus Caruccio, Aug 3, 2012:

Hi, same problem here.

In my case, an invalid utf-8 log message cause an exception when json_encode() is call.

Attached is a patch to convert everything to utf-8 prior passing it to json_encode().

Work for me ;) Hope someone review it and apply to Pluf.

Regards,
Mateus Caruccio

Attachments:
- fix-invalid-utf-8-log-message.patch - 1.25 kB
http://projects.ceondo.com/p/pluf/issues/view/attachment/320/fix-invalid-utf-8-log-message.patch


# By Thomas Keller, Jun 15, 2011:

Reply all
Reply to author
Forward
0 new messages