|Anonymous | Login | Signup for a new account||2013-05-21 17:21 PDT|
|Main | My View | View Issues | Change Log | Repositories|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000454||Friendica||public||2012-06-22 12:24||2012-12-21 14:32|
|Fixed in Version|
|Summary||0000454: Cyrillic Facebook nicks break acl|
|Description||If you have a contact whose Facebook name uses the cyrillic alphabet, the `nick` entry in the contacts database also uses the cyrillic alphabet, causing errors in mod/acl.php |
[error] 3768#0: *11659 FastCGI sent in stderr: "PHP message: PHP Warning: json_encode(): Invalid UTF-8 sequence in argument in /var/www/friendica/mod/acl.php line 191" while reading response header from upstream, client: 18.104.22.168, server: foo.com, request: "POST /acl HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", [^] host: "foo.com", referrer: "https://foo.com/network" [^]
Reproduced across three instances on varying versions of Friendica.
This leaves the privacy box empty, as though you had no contacts when you click the padlock to make a new post.
This may be hard to reproduce without cyrllic contacts. I can provide such a contact if it's needed.
|Tags||No tags attached.|
We receive this from Facebook as json encoded - and store it as we get it. FB is using utf-8 (I assume, need to verify but it would be incredible if they didn't).
So we should be able to re-encode what we received from them without error. This is perplexing.
edited on: 2012-06-23 06:33
My mistake, you're right it is UTF-8
It is cyrillic contacts causing the problem though.
I have a contact with the name Греен Куп and the nick Греен. If I rename the nick field using latin characters, the errors stop and acl selectors work again. Likewise if I delete the contact.
I can also reproduce this with any cyrillic Facebook contact - but only cyrillic. Umulats and other special characters do not have this same effect. This only happens with Facebook, but it also seems that's the only network to use non-latin characters in the nick field at all.
Another users on the same instance has the same issue - that doesn't rule out a server specific issue, but adds to the reproducibility.
This has been causing ACL warnings for a long time. It's only with a recent upgrade to PHP 5.3.14-1~dotdeb.0 with Suhosin-Patch that the warnings were anything more than just warnings.
Is this possibly some PHP configuration issue rather than a Friendica bug then?
This seems to be either a suhosin or a MariaDB bug.
Replaced php with the one from Debian Stable (was running dotdeb), and MariaDB with MySQL on one server, and with the very same database, this issue does not recur.
It may be a bug in one of those that it works.
If the contact doesn't have a nickname, we lowercase the first name and use that. The problem is that strtolower isn't safe with Cyrillic languages.
Will be converting this to use mb_convert_case() which works for most languages and charsets. Checking in shortly.
This won't affect existing contacts though - one might need to to disable Facebook friend linking, and then re-enable to sort it out. But this will lose old content. If there are only a few names to fix, it may be better to resolve them manually.
|2012-06-22 12:24||beardy-unixer||New Issue|
|2012-06-23 02:58||macgirvin||Note Added: 0000692|
|2012-06-23 06:32||beardy-unixer||Note Added: 0000693|
|2012-06-23 06:33||beardy-unixer||Note Edited: 0000693||View Revisions|
|2012-06-26 23:18||beardy-unixer||Note Added: 0000694|
|2012-06-26 23:39||macgirvin||Note Added: 0000695|
|2012-07-01 19:20||macgirvin||Status||new => resolved|
|2012-07-01 19:20||macgirvin||Resolution||open => fixed|
|2012-07-01 19:20||macgirvin||Assigned To||=> macgirvin|
|2012-12-21 14:32||macgirvin||Status||resolved => closed|
|Copyright © 2000 - 2010 MantisBT Group|