mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
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
This commit is contained in:
parent
d2f3e7f7f3
commit
7c4c76d32a
2 changed files with 8 additions and 5 deletions
|
@ -129,4 +129,10 @@ final class PhabricatorFilesApplication extends PhabricatorApplication {
|
|||
);
|
||||
}
|
||||
|
||||
public function getQuicksandURIPatternBlacklist() {
|
||||
return array(
|
||||
'/file/data/.*',
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -21,10 +21,7 @@ JX.behavior('lightbox-attachments', function (config) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (JX.Stratcom.pass()) {
|
||||
return;
|
||||
}
|
||||
e.prevent();
|
||||
e.kill();
|
||||
|
||||
var links = JX.DOM.scry(document, 'a', 'lightboxable');
|
||||
var phids = {};
|
||||
|
@ -230,7 +227,7 @@ JX.behavior('lightbox-attachments', function (config) {
|
|||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
['lightboxable', 'tag:a'],
|
||||
['lightboxable'],
|
||||
loadLightBox);
|
||||
|
||||
JX.Stratcom.listen(
|
||||
|
|
Loading…
Reference in a new issue