mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
61 lines
2.1 KiB
Protocol Buffer
61 lines
2.1 KiB
Protocol Buffer
<?php
|
|
|
|
# NOTE: modify these variables if your MySQL setup is different
|
|
|
|
define( "AUR_db_DSN_prefix", "mysql" );
|
|
define( "AUR_db_host", "unix_socket=/var/run/mysqld/mysqld.sock" );
|
|
define( "AUR_db_name", "AUR" );
|
|
define( "AUR_db_user", "aur" );
|
|
define( "AUR_db_pass", "aur" );
|
|
|
|
# Configuration of directories where things live
|
|
define( "INCOMING_DIR", "/srv/aur/unsupported/" );
|
|
define( "URL_DIR", "/packages/" );
|
|
|
|
define( "USERNAME_MIN_LEN", 3 );
|
|
define( "USERNAME_MAX_LEN", 16 );
|
|
define( "PASSWD_MIN_LEN", 4 );
|
|
|
|
# Default language for displayed messages in the web interface.
|
|
define("DEFAULT_LANG", "en");
|
|
|
|
# Enable debug sql output. This sends each query to error_log. Useful for
|
|
# development. Should not be enabled in production. Default to 0 (off).
|
|
define("SQL_DEBUG", 0);
|
|
|
|
# Set cache type. Either "APC", "MEMCACHE", or "NONE". Defaults to NONE.
|
|
#define("CACHE_TYPE", "APC");
|
|
#define("CACHE_TYPE", "MEMCACHE");
|
|
|
|
# If using memcache cache_type, list servers. You can separate multiple servers
|
|
# with a comma, ex: '127.0.0.1:11211,127.0.0.1:11212'. If undefined, defaults
|
|
# to '127.0.0.1:11211'.
|
|
#define("MEMCACHE_SERVERS", '127.0.0.1:11211');
|
|
|
|
# Session limit per user
|
|
$MAX_SESSIONS_PER_USER = 8;
|
|
|
|
# Idle seconds before timeout
|
|
$LOGIN_TIMEOUT = 7200;
|
|
|
|
# Session timeout when using "Remember me" cookies
|
|
$PERSISTENT_COOKIE_TIMEOUT = 60 * 60 * 24 * 30;
|
|
|
|
# Uncompressed file size limit for submitted tarballs (ZIP bomb protection) -
|
|
# please ensure "upload_max_filesize" is additionally set to no more than 3M,
|
|
# otherwise this check might be easy to bypass (FS#22991 for details)
|
|
$MAX_FILESIZE_UNCOMPRESSED = 1024 * 1024 * 8;
|
|
|
|
# Allow HTTPs logins only
|
|
$DISABLE_HTTP_LOGIN = true;
|
|
|
|
# Web URL used in email links and absolute redirects, no trailing slash
|
|
$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;
|