mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
aurjson.class.php: Limit number of RPC results
With no limit to the number of results, memory_limit set to 32M can easily be exceeded for searches that have a large number of results. This results in an HTTP error 500 for those queries. Limit results to an amount set within config.inc.php to avoid exceeding memory_limit. Introduce new JSON error code for when the result limit is hit. Fixes FS#31849 Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
5222bf0932
commit
43a69e7127
2 changed files with 21 additions and 5 deletions
|
@ -55,3 +55,7 @@ $AUR_LOCATION = "http://localhost";
|
|||
# Use virtual URLs -- to enable this feature, you also need to tell your web
|
||||
# server to redirect all requests to "/index.php/$uri".
|
||||
$USE_VIRTUAL_URLS = true;
|
||||
|
||||
# Maximum number of package results to return through an RPC connection.
|
||||
# Avoid setting this too high and having a PHP too much memory error.
|
||||
$MAX_RPC_RESULTS = 5000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue