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

Fix a Quicksand/Lightbox contention issue

Summary:
Fixes T11785. Lightbox calls `JX.Stratcom.pass()` to let other handlers react, but should not. At least today, we never put, e.g., links inside a lightbox.

This code appears in the original commit so it was probably just copy/pasted from somewhere and I missed it in review.

(Or there's some edge case I'm not thinking of and we'll figure it out soon enough.)

Additionally, blacklist `/file/data/` from Quicksand naviagtion: Quicksand should never fetch these URIs.

Test Plan:
- Disabled `security.alternate-file-domain`.
- Enabled Quicksand ("Persistent Chat").
- Clicked an image thumbnail on a task.
- Repeated that until things flipped out a bit.
- After the patch: no issues.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11785

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

+8 -5
+6
src/applications/files/application/PhabricatorFilesApplication.php
··· 129 129 ); 130 130 } 131 131 132 + public function getQuicksandURIPatternBlacklist() { 133 + return array( 134 + '/file/data/.*', 135 + ); 136 + } 137 + 132 138 }
+2 -5
webroot/rsrc/js/core/behavior-lightbox-attachments.js
··· 21 21 return; 22 22 } 23 23 24 - if (JX.Stratcom.pass()) { 25 - return; 26 - } 27 - e.prevent(); 24 + e.kill(); 28 25 29 26 var links = JX.DOM.scry(document, 'a', 'lightboxable'); 30 27 var phids = {}; ··· 230 227 231 228 JX.Stratcom.listen( 232 229 'click', 233 - ['lightboxable', 'tag:a'], 230 + ['lightboxable'], 234 231 loadLightBox); 235 232 236 233 JX.Stratcom.listen(