1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-24 07:42:40 +01:00
phorge-phorge/src/applications/files
epriestley cb99396c64 Make the "Is this JSON?" DocumentEngine heuristic a little tighter
Summary:
See PHI749. Ref T13164. We currently misdetect files starting with `[submodule ...` as JSON.

Make this a bit stricter:

  - If the file is short, just see if it's actually literally real JSON.
  - If the file is long, give up.

This should get the right result in pretty much all the cases people care about, I think. We could make the long-file guesser better some day.

Test Plan: Detected a `[submodule ...` file (no longer JSON) and a `{"duck": "quack"}` file (still JSON).

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13164

Differential Revision: https://secure.phabricator.com/D19544
2018-07-27 12:27:02 -07:00
..
action Rate limit outbound requests in Macros 2015-03-26 11:11:52 -07:00
application Pull file Document Engine rendering out of "Files" application controllers 2018-04-09 04:45:58 -07:00
applicationpanel Allow diffusion.filecontentquery to load data for arbitrarily large files 2016-01-21 09:52:43 -08:00
builtin Reduce the cost of generating default user profile images 2018-03-01 16:53:17 -08:00
capability Add default policy to Files application 2014-11-21 11:17:20 -08:00
conduit Stop trying to assess the image dimensions of large files and file chunks 2017-12-18 09:17:32 -08:00
config Add a PDF document "rendering" engine 2018-03-23 07:14:17 -07:00
constants Prettier file embeds 2016-11-27 14:57:06 -08:00
controller Restore support for using "arc download" to fetch files with no "security.alternate-file-domain" 2018-05-01 10:08:05 -07:00
document Make the "Is this JSON?" DocumentEngine heuristic a little tighter 2018-07-27 12:27:02 -07:00
edge Modernize remaining edge types 2015-01-03 10:58:20 +11:00
editor Use object PHIDs for "Thread-Topic" headers in mail 2018-02-08 06:21:00 -08:00
engine Kick off indexing for File objects on creation 2017-04-18 08:38:34 -07:00
exception Store and verify content integrity checksums for files 2017-04-05 11:12:31 -07:00
favicon Recover more gracefully when favicon configuration points at a corrupt/damaged file 2018-04-27 12:02:32 -07:00
format Support HMAC+SHA256 with automatic key generation and management 2017-04-06 15:42:59 -07:00
garbagecollector Implement ngram search for File objects 2017-04-17 17:37:20 -07:00
iconset Convert all calls to 'IconFont' to just 'Icon' 2016-01-27 20:59:27 -08:00
keyring Support AES256 at-rest encryption in Files 2016-06-16 08:08:56 -07:00
lipsum Make bin/lipsum generate hanldle generator keys and arguments more clearly 2017-02-27 09:09:28 -08:00
mail phtize all the things 2015-05-22 21:16:39 +10:00
management When migrating files between storage engines with "bin/files migrate ...", skip expired temporary files 2018-07-26 06:22:23 -07:00
markup Omit "type" attribute from "<source />" tags in "<video>" to trick Chrome into playing them 2018-05-04 09:28:47 -07:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Skip loading file transform sources when we know a file is not transformed 2018-03-14 12:45:06 -07:00
storage Fix file encoding migration 2018-07-23 17:41:10 -05:00
transform Add unit tests for file thumbnail generation 2017-04-23 11:02:21 -07:00
typeahead Add a basic icon typeahead 2017-02-03 09:19:29 -08:00
uploadsource Support export of data in files larger than 8MB 2018-01-29 15:58:34 -08:00
view Allow users to drop .ics files on calendar views to import them 2016-10-18 15:26:44 -07:00
worker Make daemons perform file deletion 2017-04-18 11:09:41 -07:00
xaction Switch File deletion to use ModularTransactions 2017-04-18 13:01:51 -07:00
PhabricatorImageTransformer.php Somewhat improve meme transform code so it is merely very bad 2018-03-08 11:08:55 -08:00