X-Git-Url: https://jfr.im/git/uguu.git/blobdiff_plain/d8c46ff78ae2707a580f7b0446349122297b434f..refs/tags/v1.2.0:/static/php/includes/settings.inc.php diff --git a/static/php/includes/settings.inc.php b/static/php/includes/settings.inc.php index 5f0013e..58e9738 100644 --- a/static/php/includes/settings.inc.php +++ b/static/php/includes/settings.inc.php @@ -12,7 +12,7 @@ * * @see http://php.net/manual/en/ref.pdo-mysql.connection.php PHP manual for * PDO_MYSQL DSN. - * @param string POMF_DB_CONN DSN:host|unix_socket=hostname|path;dbname=database + * @param string UGUU_DB_CONN DSN:host|unix_socket=hostname|path;dbname=database */ define('UGUU_DB_CONN', 'sqlite:/path/to/db/uguu.sq3'); @@ -20,11 +20,21 @@ define('UGUU_DB_CONN', 'sqlite:/path/to/db/uguu.sq3'); * PDO database login credentials */ -/* @param string POMF_DB_NAME Database username */ +/* @param string UGUU_DB_NAME Database username */ define('UGUU_DB_USER', 'NULL'); -/* @param string POMF_DB_PASS Database password */ +/* @param string UGUU_DB_PASS Database password */ define('UGUU_DB_PASS', 'NULL'); +/** + * @param boolean Log IP of uploads + */ +define('LOG_IP', false); + +/** + * @param boolean anti-dupe + */ +define('ANTI_DUPE', false); + /* * File system location where to store uploaded files * @@ -35,18 +45,18 @@ define('UGUU_FILES_ROOT', '/path/to/file/'); /* * Maximum number of iterations while generating a new filename * - * Pomf uses an algorithm to generate random filenames. Sometimes a file may + * Uguu uses an algorithm to generate random filenames. Sometimes a file may * exist under a randomly generated filename, so we count tries and keep trying. * If this value is exceeded, we give up trying to generate a new filename. * - * @param int POMF_FILES_RETRIES Number of attempts to retry + * @param int UGUU_FILES_RETRIES Number of attempts to retry */ define('UGUU_FILES_RETRIES', 15); /* * The length of generated filename (without file extension) * - * @param int POMF_FILES_LENGTH Number of random alphabetical ASCII characters + * @param int UGUU_FILES_LENGTH Number of random alphabetical ASCII characters * to use */ define('UGUU_FILES_LENGTH', 8); @@ -54,9 +64,9 @@ define('UGUU_FILES_LENGTH', 8); /* * URI to prepend to links for uploaded files * - * @param string POMF_URL URI with trailing delimiter + * @param string UGUU_URL URI with trailing delimiter */ -define('UGUU_URL', 'https://a.uguu.se/'); +define('UGUU_URL', 'https://url.to.subdomain.where.files.will.be.served.com/'); /* * URI for filename generation @@ -67,24 +77,20 @@ define('ID_CHARSET', 'abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ'); /* * Filtered mime types - * @param string[] $FILTER_MIME allowed/blocked mime types */ -//$FILTER_MIME = array("application/octet-stream", "application/msword", "text/html", "application/x-dosexec", "application/zip", "application/java", "application/java-archive", "application/pdf", "application/x-executable"); -//$FILTER_EXT = array("exe", "scr", "com", "vbs", "bat", "cmd", "htm", "html", "zip", "jar", "msi", "apk", "pdf"); - -define('CONFIG_BLOCKED_EXTENSIONS', serialize(['exe', 'scr', 'com', 'vbs', 'bat', 'cmd', 'htm', 'html', 'jar', 'msi', 'apk', 'phtml'])); -define('CONFIG_BLOCKED_MIME', serialize(['application/msword', 'text/html', 'application/x-dosexec', 'application/java', 'application/java-archive', 'application/x-executable', 'application/x-mach-binary'])); +define('CONFIG_BLOCKED_EXTENSIONS', serialize(['exe', 'scr', 'com', 'vbs', 'bat', 'cmd', 'htm', 'html', 'jar', 'msi', 'apk', 'phtml', 'svg'])); +define('CONFIG_BLOCKED_MIME', serialize(['application/msword', 'text/html', 'application/x-dosexec', 'application/java', 'application/java-archive', 'application/x-executable', 'application/x-mach-binary', 'image/svg+xml'])); /** - * Filter mode: whitelist (true) or blacklist (false). - * - * @param bool $FILTER_MODE mime type filter mode + * Whitelist or blacklist mode + * @param boolean blacklist (false) | whitelist (true) */ -$FILTER_MODE = false; +define('CONFIG_FILTER_MODE', false); + /** * Double dot file extensions. * - * Pomf keeps the last file extension for the uploaded file. In other words, an + * Uguu keeps the last file extension for the uploaded file. In other words, an * uploaded file with `.tar.gz` extension will be given a random filename which * ends in `.gz` unless configured here to ignore discards for `.tar.gz`. *