@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.

Allow upload of arbitrary text files

Summary:
Fixes T8984. Because of how drag-and-drop upload works, the text file with content `code` is interpreted as a forbidden variable. Disable this check for the drop upload controller.

(The risk here is a general one where the controller redirects and bundles paramters; this controller does not do that, so it's safe to make this change.)

Test Plan: Uploaded a text file containing only the string "code" (no quotes) by using drag-and-drop.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8984

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

+6
+6
src/applications/files/controller/PhabricatorFileDropUploadController.php
··· 3 3 final class PhabricatorFileDropUploadController 4 4 extends PhabricatorFileController { 5 5 6 + public function shouldAllowRestrictedParameter($parameter_name) { 7 + // Prevent false positives from file content when it is submitted via 8 + // drag-and-drop upload. 9 + return true; 10 + } 11 + 6 12 /** 7 13 * @phutil-external-symbol class PhabricatorStartup 8 14 */