From 7e46f033b6d6e495e430e8537105b8fa60d52b00 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Sun, 25 Dec 2022 13:04:05 +0100 Subject: [PATCH 1/3] Reorder the sample config file in order to have a cleaner structure and better sectioning in the online manual The change should only affect the conmments and reorder the config lines Copy modifications from https://github.com/nextcloud/documentation/pull/9166 into sample config file Signed-off-by: Christian Wolf --- config/config.sample.php | 114 +++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index bc38a9f5444..f54091227a2 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -675,7 +675,7 @@ $CONFIG = [ * and a maximum time for trash bin retention. * * Minimum time is the number of days a file will be kept, after which it - * _may be_ deleted. A file may be deleted after the minimum number of days + * *may be* deleted. A file may be deleted after the minimum number of days * is expired if space is needed. The file will not be deleted if space is * not needed. * @@ -687,8 +687,8 @@ $CONFIG = [ * * If a user quota is defined, 50% of the user's remaining quota space sets * the limit for the trashbin. * - * Maximum time is the number of days at which it is _guaranteed - * to be_ deleted. There is no further dependency on the available space. + * Maximum time is the number of days at which it is *guaranteed + * to be* deleted. There is no further dependency on the available space. * * Both minimum and maximum times can be set together to explicitly define * file and folder deletion. For migration purposes, this setting is installed @@ -1664,6 +1664,14 @@ $CONFIG = [ */ 'sharing.allow_custom_share_folder' => true, +/** + * Define a default folder for shared files and folders other than root. + * Changes to this value will only have effect on new shares. + * + * Defaults to ``/`` + */ +'share_folder' => '/', + /** * Set to ``false``, to stop sending a mail when users receive a share */ @@ -1682,6 +1690,52 @@ $CONFIG = [ */ 'transferIncomingShares' => false, +/** + * Hashing + */ + +/** + * By default, Nextcloud will use the Argon2 password hashing if available. + * However, if for whatever reason you want to stick with the PASSWORD_DEFAULT + * of your php version. Then set the setting to true. + */ +'hashing_default_password' => false, + +/** + * + * Nextcloud uses the Argon2 algorithm (with PHP >= 7.2) to create hashes by its + * own and exposes its configuration options as following. More information can + * be found at: https://www.php.net/manual/en/function.password-hash.php + */ + +/** + * The number of CPU threads to be used by the algorithm for computing a hash. + * The value must be an integer, and the minimum value is 1. Rationally it does + * not help to provide a number higher than the available threads on the machine. + * Values that undershoot the minimum will be ignored in favor of the minimum. + */ +'hashingThreads' => PASSWORD_ARGON2_DEFAULT_THREADS, + +/** + * The memory in KiB to be used by the algorithm for computing a hash. The value + * must be an integer, and the minimum value is 8 times the number of CPU threads. + * Values that undershoot the minimum will be ignored in favor of the minimum. + */ +'hashingMemoryCost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST, + +/** + * The number of iterations that are used by the algorithm for computing a hash. + * The value must be an integer, and the minimum value is 1. Values that + * undershoot the minimum will be ignored in favor of the minimum. + */ +'hashingTimeCost' => PASSWORD_ARGON2_DEFAULT_TIME_COST, + +/** + * The hashing cost used by hashes generated by Nextcloud + * Using a higher value requires more time and CPU power to calculate the hashes + */ +'hashingCost' => 10, + /** * All other configuration options */ @@ -1802,52 +1856,6 @@ $CONFIG = [ */ 'updatedirectory' => '', -/** - * Hashing - */ - -/** - * By default, Nextcloud will use the Argon2 password hashing if available. - * However, if for whatever reason you want to stick with the PASSWORD_DEFAULT - * of your php version. Then set the setting to true. - */ -'hashing_default_password' => false, - -/** - * - * Nextcloud uses the Argon2 algorithm (with PHP >= 7.2) to create hashes by its - * own and exposes its configuration options as following. More information can - * be found at: https://www.php.net/manual/en/function.password-hash.php - */ - -/** - * The number of CPU threads to be used by the algorithm for computing a hash. - * The value must be an integer, and the minimum value is 1. Rationally it does - * not help to provide a number higher than the available threads on the machine. - * Values that undershoot the minimum will be ignored in favor of the minimum. - */ -'hashingThreads' => PASSWORD_ARGON2_DEFAULT_THREADS, - -/** - * The memory in KiB to be used by the algorithm for computing a hash. The value - * must be an integer, and the minimum value is 8 times the number of CPU threads. - * Values that undershoot the minimum will be ignored in favor of the minimum. - */ -'hashingMemoryCost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST, - -/** - * The number of iterations that are used by the algorithm for computing a hash. - * The value must be an integer, and the minimum value is 1. Values that - * undershoot the minimum will be ignored in favor of the minimum. - */ -'hashingTimeCost' => PASSWORD_ARGON2_DEFAULT_TIME_COST, - -/** - * The hashing cost used by hashes generated by Nextcloud - * Using a higher value requires more time and CPU power to calculate the hashes - */ -'hashingCost' => 10, - /** * Blacklist a specific file or files and disallow the upload of files * with this name. ``.htaccess`` is blocked by default. @@ -1857,14 +1865,6 @@ $CONFIG = [ */ 'blacklisted_files' => ['.htaccess'], -/** - * Define a default folder for shared files and folders other than root. - * Changes to this value will only have effect on new shares. - * - * Defaults to ``/`` - */ -'share_folder' => '/', - /** * If you are applying a theme to Nextcloud, enter the name of the theme here. * The default location for themes is ``nextcloud/themes/``. From 6ae6615e1daf6ff8a4c3eae8007cef5fb01c7d2c Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Tue, 27 Dec 2022 11:26:52 +0100 Subject: [PATCH 2/3] Fix some issues that were not yet introduced in changes to sample config This should not change anything but fix some documentation issues. This change should not change anything in the implemenetation. Signed-off-by: Christian Wolf --- config/config.sample.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index f54091227a2..d5ba2944c74 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1698,15 +1698,12 @@ $CONFIG = [ * By default, Nextcloud will use the Argon2 password hashing if available. * However, if for whatever reason you want to stick with the PASSWORD_DEFAULT * of your php version. Then set the setting to true. - */ -'hashing_default_password' => false, - -/** * * Nextcloud uses the Argon2 algorithm (with PHP >= 7.2) to create hashes by its * own and exposes its configuration options as following. More information can * be found at: https://www.php.net/manual/en/function.password-hash.php */ +'hashing_default_password' => false, /** * The number of CPU threads to be used by the algorithm for computing a hash. @@ -2291,9 +2288,13 @@ $CONFIG = [ * * For instance, if the phone property should default to the private scope * instead of the local one: - * [ - * \OCP\Accounts\IAccountManager::PROPERTY_PHONE => \OCP\Accounts\IAccountManager::SCOPE_PRIVATE - * ] + * + * :: + * + * [ + * \OCP\Accounts\IAccountManager::PROPERTY_PHONE => \OCP\Accounts\IAccountManager::SCOPE_PRIVATE + * ] + * */ 'account_manager.default_property_scope' => [], From 6638185eaeebee7877a36bc7d13c44d303b7b51b Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Wed, 28 Dec 2022 09:06:33 +0100 Subject: [PATCH 3/3] Fix comments in sample config to be correctly marked as verbatim The comments were not marked as verbatim and thus the Sphinx compiler to generate the online admin manual interpreted backslashes as special chars. They disappeared from the output. By adding ``, it is marked as verbatim and the backslashes are not removed. Signed-off-by: Christian Wolf --- config/config.sample.php | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index d5ba2944c74..a2976ed1a7b 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1193,7 +1193,7 @@ $CONFIG = [ /** * Set the URL of the Imaginary service to send image previews to. - * Also requires the OC\Preview\Imaginary provider to be enabled. + * Also requires the ``OC\Preview\Imaginary`` provider to be enabled. * * See https://github.com/h2non/imaginary */ @@ -1205,33 +1205,33 @@ $CONFIG = [ * The following providers are disabled by default due to performance or privacy * concerns: * - * - OC\Preview\Illustrator - * - OC\Preview\HEIC - * - OC\Preview\Movie - * - OC\Preview\MSOffice2003 - * - OC\Preview\MSOffice2007 - * - OC\Preview\MSOfficeDoc - * - OC\Preview\PDF - * - OC\Preview\Photoshop - * - OC\Preview\Postscript - * - OC\Preview\StarOffice - * - OC\Preview\SVG - * - OC\Preview\TIFF - * - OC\Preview\Font + * - ``OC\Preview\Illustrator`` + * - ``OC\Preview\HEIC`` + * - ``OC\Preview\Movie`` + * - ``OC\Preview\MSOffice2003`` + * - ``OC\Preview\MSOffice2007`` + * - ``OC\Preview\MSOfficeDoc`` + * - ``OC\Preview\PDF`` + * - ``OC\Preview\Photoshop`` + * - ``OC\Preview\Postscript`` + * - ``OC\Preview\StarOffice`` + * - ``OC\Preview\SVG`` + * - ``OC\Preview\TIFF`` + * - ``OC\Preview\Font`` * * * Defaults to the following providers: * - * - OC\Preview\BMP - * - OC\Preview\GIF - * - OC\Preview\JPEG - * - OC\Preview\MarkDown - * - OC\Preview\MP3 - * - OC\Preview\PNG - * - OC\Preview\TXT - * - OC\Preview\XBitmap - * - OC\Preview\OpenDocument - * - OC\Preview\Krita + * - ``OC\Preview\BMP`` + * - ``OC\Preview\GIF`` + * - ``OC\Preview\JPEG`` + * - ``OC\Preview\MarkDown`` + * - ``OC\Preview\MP3`` + * - ``OC\Preview\PNG`` + * - ``OC\Preview\TXT`` + * - ``OC\Preview\XBitmap`` + * - ``OC\Preview\OpenDocument`` + * - ``OC\Preview\Krita`` */ 'enabledPreviewProviders' => [ 'OC\Preview\PNG', @@ -2283,8 +2283,8 @@ $CONFIG = [ /** * Allows to override the default scopes for Account data. * The list of overridable properties and valid values for scopes are in - * OCP\Accounts\IAccountManager. Values added here are merged with - * default values, which are in OC\Accounts\AccountManager + * ``OCP\Accounts\IAccountManager``. Values added here are merged with + * default values, which are in ``OC\Accounts\AccountManager``. * * For instance, if the phone property should default to the private scope * instead of the local one: