1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-26 15:30:58 +01:00
phorge-phorge/src/infrastructure
epriestley e7a7e43104 Fix a bug where policy queries with cursor-based pagers and non-ID orders can go into infinite loops
Summary:
Ref T603. See inlines for an explanation. The case where I hit this was loading the "Pending Differential Revisions" panel in Diffusion when logged out, after making a repository public.

What happens is that we load 10 revisions (say, D1 .. D10) but the user can't see any of them. We then try to load the next 10, but since the pagination is ordered by date modified, we need to base the next query on the modified date of the last thing we loaded (D10). However, since we use the viewer's policies to load that cursor object, it fails to load, and then we just issue the same query over and over again, loading D1 .. D10 until we run out of execution time.

Test Plan: Interface now loads correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7059
2013-09-21 16:23:44 -07:00
..
__tests__ In unit test environments, install all applications 2013-05-16 12:25:26 -07:00
celerity More Diviner style updates 2013-09-05 12:29:07 -07:00
customfield Render Maniphest fields in an application-transactions-compatible way 2013-09-21 16:23:17 -07:00
daemon Fix PhabricatorBot macro cacheing 2013-08-04 15:40:04 -07:00
diff Don't fatal with error in transaction diff 2013-04-16 08:41:36 -07:00
edges Purge loadRelativeEdges 2013-09-13 11:40:52 -07:00
env Drive auth config with the database 2013-06-20 11:18:11 -07:00
events Add event dispatch for updated search indexes 2013-09-12 13:05:54 -07:00
internationalization Clean up Diffusion repository list 2013-09-10 15:29:46 -07:00
javelin Remove deprecated javelin_render_tag() and phabricator_render_form() 2013-07-18 13:30:25 -07:00
lint Remove deprecated javelin_render_tag() and phabricator_render_form() 2013-07-18 13:30:25 -07:00
markup Clean up some more Diviner stuff 2013-09-08 09:16:55 -07:00
query Fix a bug where policy queries with cursor-based pagers and non-ID orders can go into infinite loops 2013-09-21 16:23:44 -07:00
ssh Implement SSHD glue and Conduit SSH endpoint 2012-12-19 11:08:07 -08:00
storage Add some keys and policy fields to repositories 2013-09-21 16:23:01 -07:00
testing in test environments, install beta applications 2013-05-22 09:49:10 -07:00
time Consolidate some datetime code and add unit tests 2013-06-03 12:58:11 -07:00
util Proof of concept mitigation of BREACH 2013-08-07 16:09:05 -07:00
PhabricatorAccessLog.php Fail quietly when failing to write access log 2013-05-09 16:08:26 -07:00
PhabricatorEditor.php Delete license headers from files 2012-11-05 11:16:51 -08:00