1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-21 09:48:47 +02:00
phorge-phorge/src/infrastructure/query
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
..
policy 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
PhabricatorEmptyQueryException.php Introduce PhabricatorEmptyQueryException 2013-03-06 19:22:00 -08:00
PhabricatorOffsetPagedQuery.php Delete license headers from files 2012-11-05 11:16:51 -08:00
PhabricatorQuery.php Delete license headers from files 2012-11-05 11:16:51 -08:00