summaryrefslogtreecommitdiffstats
path: root/aurweb
diff options
context:
space:
mode:
authorMorten Linderud <morten@linderud.pw>2020-09-04 09:27:34 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2020-09-05 16:21:16 +0200
commit613364b773c6352ae17aea3d2a74786fe0ca607d (patch)
treee88f11e8f05911013a7f46292b086e15ed686cdb /aurweb
parentc4f4ac510be1898e6969d13dd4f37c0a3f807aff (diff)
downloadaur-613364b773c6352ae17aea3d2a74786fe0ca607d.tar.gz
aur-613364b773c6352ae17aea3d2a74786fe0ca607d.tar.xz
pkg_search_page: Limit number of results on package search
The current package search query is quite poorly optimized and becomes a resource hog when the offsets gets large enough. This DoSes the service. A quick fix is to just ensure we have some limit to the number of hits we return. The current hardcoding of 2500 is based on the following: * 250 hits per page max * 10 pages We can maybe consider having it lower, but it seems easier to just have this a multiple of 250 in the first iteration. Signed-off-by: Morten Linderud <morten@linderud.pw> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb')
0 files changed, 0 insertions, 0 deletions