1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 11:30:55 +01:00
phorge-phorge/src/applications/repository
epriestley 53b25db918 Prevent enormous changes from being pushed to repositoires by default
Summary:
Fixes T13031. "Enormous" changes are basically changes which are too large to hold in memory, although the actual definition we use today is "more than 1GB of change text or `git diff` runs for more than 15 minutes".

If an install configures a Herald content rule like "when content matches /XYZ/, do something" and then a user pushes a 30 GB source file, we can't put it into memory to `preg_match()` it. Currently, the way to handle this case is to write a separate Herald rule that rejects enormous changes. However, this isn't obvious and means the default behavior is unsafe.

Make the default behavior safe by rejecting these changes with a message, similar to how we reject "dangerous" changes (which permanently delete or overwrite history) by default.

Also, change a couple of UI strings from "Enormous" to "Very Large" to reduce ambiguity. See <https://discourse.phabricator-community.org/t/herald-enormous-check/822>.

Test Plan: Changed the definition of "enormous" from 1GB to 1 byte. Pushed a change; got rejected. Allowed enormous changes, pushed, got rejected by a Herald rule. Disabled the Herald rule, pushed, got a clean push. Prevented enormous changes again. Grepped for "enormous" elsewhere in the UI.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: joshuaspence

Maniphest Tasks: T13031

Differential Revision: https://secure.phabricator.com/D18850
2018-01-04 10:02:29 -08:00
..
codex When destorying a repository, print a notification about removing the working copy 2017-08-01 08:57:39 -07:00
conduit Update Diffusion conduit text 2017-07-02 14:25:10 +00:00
config Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
constants Simplify Create Repository page 2017-08-15 11:05:50 -07:00
customfield Move various other callsites away from callsigns 2016-01-04 06:54:42 -08:00
daemon Fix spelling 2017-10-09 10:48:04 -07:00
data Fix spelling 2017-10-09 10:48:04 -07:00
editor Prevent enormous changes from being pushed to repositoires by default 2018-01-04 10:02:29 -08:00
engine Fix spelling 2017-10-09 10:48:04 -07:00
graphcache Bail out of PhabricatorRepositoryGraphCache more aggressively after cache fills 2017-10-06 14:12:58 -07:00
mail Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
management Fix spelling 2017-10-09 10:48:04 -07:00
phid Render revision and audit state icons in Maniphest 2017-01-12 13:23:13 -08:00
query Specify a null behavior for the callsign sort column. 2017-11-14 17:16:01 -06:00
response Accept and route VCS HTTP requests 2013-10-29 15:32:40 -07:00
search Support the Ferret engine in Diffusion 2017-09-07 13:41:04 -07:00
storage Prevent enormous changes from being pushed to repositoires by default 2018-01-04 10:02:29 -08:00
worker Fix spelling 2017-10-09 10:48:04 -07:00