Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4913085
malformed-utf8-recent-activity-feed.patch
tavvva (Jaromír Cápík)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
tavvva
Apr 18 2017, 6:46 AM
2017-04-18 06:46:50 (UTC+0)
Size
646 B
Referenced Files
None
Subscribers
None
malformed-utf8-recent-activity-feed.patch
View Options
diff --git a/src/infrastructure/storage/lisk/LiskDAO.php b/src/infrastructure/storage/lisk/LiskDAO.php
index 94eef7d16..fa0802031 100644
--- a/src/infrastructure/storage/lisk/LiskDAO.php
+++ b/src/infrastructure/storage/lisk/LiskDAO.php
@@ -1698,6 +1698,9 @@ abstract class LiskDAO extends Phobject {
if ($deserialize) {
$data[$col] = json_decode($data[$col], true);
} else {
+ foreach ($data[$col] as &$value) {
+ $value = iconv("UTF-8","UTF-8//IGNORE",$value);
+ }
$data[$col] = phutil_json_encode($data[$col]);
}
break;
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
623283
Default Alt Text
malformed-utf8-recent-activity-feed.patch (646 B)
Attached To
Mode
T12581: The "Recent Activity" feed flooded with duplicates because of invalid UTF-8 characters
Attached
Detach File
Event Timeline
Log In to Comment