@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Truncate large strings in DarkConsole

Summary:
Ref T8597. If a page issues a large query (like inserting a blob into file storage), we may try to utf8ize the entire thing. This is slow and pointless.

Instead, truncate tab data after 4096 bytes before sanitizing.

Test Plan: Adjusted limit to 256 bytes, saw long queries get truncated reasonably.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8597

Differential Revision: https://secure.phabricator.com/D13347

+7
+7
src/applications/console/core/DarkConsoleCore.php
··· 127 127 } 128 128 return $data; 129 129 } else { 130 + // Truncate huge strings. Since the data doesn't really matter much, 131 + // just truncate bytes to avoid PhutilUTF8StringTruncator overhead. 132 + $length = strlen($data); 133 + $max = 4096; 134 + if ($length > $max) { 135 + $data = substr($data, 0, $max).'...<'.$length.' bytes>...'; 136 + } 130 137 return phutil_utf8ize($data); 131 138 } 132 139 }