diff --git a/docs/security-tuning.md b/docs/security-tuning.md index 5e7ce7ce06..0642805c41 100644 --- a/docs/security-tuning.md +++ b/docs/security-tuning.md @@ -330,7 +330,7 @@ Here is the list of related settings : | --------------------------- | ------------ | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ | | `USE_ANTIBOT` | `no` | multisite | no | Activate antibot feature. | | `ANTIBOT_URI` | `/challenge` | multisite | no | Unused URI that clients will be redirected to to solve the challenge. | -| `ANTIBOT_RECAPTCHA_SCORE` | `0.7` | multisite | no | Minimum score required for reCAPTCHA challenge. | +| `ANTIBOT_RECAPTCHA_SCORE` | `0.7` | multisite | no | Minimum score required for reCAPTCHA challenge (Only compatible with reCAPTCHA v3). | | `ANTIBOT_RECAPTCHA_SITEKEY` | | multisite | no | Sitekey for reCAPTCHA challenge. | | `ANTIBOT_RECAPTCHA_SECRET` | | multisite | no | Secret for reCAPTCHA challenge. | | `ANTIBOT_HCAPTCHA_SITEKEY` | | multisite | no | Sitekey for hCaptcha challenge. | diff --git a/docs/settings.md b/docs/settings.md index fbe4efdc91..14c06310be 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -65,7 +65,7 @@ Bot detection by using a challenge. |`ANTIBOT_URI` |`/challenge`|multisite|no |Unused URI that clients will be redirected to to solve the challenge. | |`ANTIBOT_TIME_RESOLVE` |`60` |multisite|no |Maximum time (in seconds) clients have to resolve the challenge. Once this time has passed, a new challenge will be generated.| |`ANTIBOT_TIME_VALID` |`86400` |multisite|no |Maximum validity time of solved challenges. Once this time has passed, clients will need to resolve a new one. | -|`ANTIBOT_RECAPTCHA_SCORE` |`0.7` |multisite|no |Minimum score required for reCAPTCHA challenge. | +|`ANTIBOT_RECAPTCHA_SCORE` |`0.7` |multisite|no |Minimum score required for reCAPTCHA challenge (Only compatible with reCAPTCHA v3). | |`ANTIBOT_RECAPTCHA_SITEKEY`| |multisite|no |Sitekey for reCAPTCHA challenge. | |`ANTIBOT_RECAPTCHA_SECRET` | |multisite|no |Secret for reCAPTCHA challenge. | |`ANTIBOT_HCAPTCHA_SITEKEY` | |multisite|no |Sitekey for hCaptcha challenge. | diff --git a/src/autoconf/Config.py b/src/autoconf/Config.py index d599dacec5..c1970e1c01 100644 --- a/src/autoconf/Config.py +++ b/src/autoconf/Config.py @@ -46,8 +46,12 @@ def __get_full_env(self) -> dict: if not server_name: continue for variable, value in service.items(): - if self._db.is_setting(variable, multisite=True): - config[f"{server_name}_{variable}"] = value + if variable.startswith("CUSTOM_CONF") or not variable.isupper(): + continue + if not self._db.is_setting(variable, multisite=True): + self.__logger.warning(f"Variable {variable}: {value} is not a valid multisite setting, ignoring it") + continue + config[f"{server_name}_{variable}"] = value config["SERVER_NAME"] += f" {server_name}" config["SERVER_NAME"] = config["SERVER_NAME"].strip() return config @@ -134,6 +138,7 @@ def apply( # update instances in database if "instances" in changes: + self.__logger.debug(f"Updating instances in database: {self.__instances}") err = self._db.update_instances(self.__instances, changed=False) if err: self.__logger.error(f"Failed to update instances: {err}") @@ -141,6 +146,7 @@ def apply( # save config to database changed_plugins = [] if "config" in changes: + self.__logger.debug(f"Saving config in database: {self.__config}") err = self._db.save_config(self.__config, "autoconf", changed=False) if isinstance(err, str): success = False @@ -149,6 +155,7 @@ def apply( # save custom configs to database if "custom_configs" in changes: + self.__logger.debug(f"Saving custom configs in database: {custom_configs}") err = self._db.save_custom_configs(custom_configs, "autoconf", changed=False) if err: success = False diff --git a/src/bw/loading/index.html b/src/bw/loading/index.html index 81c11d77ed..60a746a35c 100644 --- a/src/bw/loading/index.html +++ b/src/bw/loading/index.html @@ -256,6 +256,15 @@ + {-raw-} + + {-raw-} +