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
|
@ -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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JX.Stratcom.pass()) {
|
e.kill();
|
||||||
return;
|
|
||||||
}
|
|
||||||
e.prevent();
|
|
||||||
|
|
||||||
var links = JX.DOM.scry(document, 'a', 'lightboxable');
|
var links = JX.DOM.scry(document, 'a', 'lightboxable');
|
||||||
var phids = {};
|
var phids = {};
|
||||||
|
@ -230,7 +227,7 @@ JX.behavior('lightbox-attachments', function (config) {
|
||||||
|
|
||||||
JX.Stratcom.listen(
|
JX.Stratcom.listen(
|
||||||
'click',
|
'click',
|
||||||
['lightboxable', 'tag:a'],
|
['lightboxable'],
|
||||||
loadLightBox);
|
loadLightBox);
|
||||||
|
|
||||||
JX.Stratcom.listen(
|
JX.Stratcom.listen(
|
||||||
|
|
Loading…
Reference in a new issue