mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 08:22:59 +02:00
Compare commits
No commits in common. "b71186d9588a2b4998899cc2df99f0ab7e764bea" and "f0994355d494a1acae34c9a899fd9ee27a9d2fb1" have entirely different histories.
b71186d958
...
f0994355d4
4 changed files with 6 additions and 15 deletions
|
@ -442,9 +442,8 @@
|
||||||
#registration_token_file =
|
#registration_token_file =
|
||||||
|
|
||||||
# The public site key for reCaptcha. If this is provided, reCaptcha
|
# The public site key for reCaptcha. If this is provided, reCaptcha
|
||||||
# becomes required during registration. If both captcha *and*
|
# becomes required during registration, **even if token registration is
|
||||||
# registration token are enabled, both will be required during
|
# enabled**.
|
||||||
# registration.
|
|
||||||
#
|
#
|
||||||
# IMPORTANT: "Verify the origin of reCAPTCHA solutions" **MUST** BE
|
# IMPORTANT: "Verify the origin of reCAPTCHA solutions" **MUST** BE
|
||||||
# DISABLED IF YOU WANT THE CAPTCHA TO WORK IN 3RD PARTY CLIENTS, OR
|
# DISABLED IF YOU WANT THE CAPTCHA TO WORK IN 3RD PARTY CLIENTS, OR
|
||||||
|
|
|
@ -180,18 +180,11 @@ pub fn check(config: &Config) -> Result {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.recaptcha_site_key.is_some() && config.recaptcha_private_site_key.is_none() {
|
|
||||||
return Err!(Config(
|
|
||||||
"recaptcha_private_site_key",
|
|
||||||
"reCAPTCHA private site key is required when reCAPTCHA site key is set."
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.allow_registration
|
if config.allow_registration
|
||||||
&& !config.yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse
|
&& !config.yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse
|
||||||
&& config.registration_token.is_none()
|
&& config.registration_token.is_none()
|
||||||
&& config.registration_token_file.is_none()
|
&& config.registration_token_file.is_none()
|
||||||
&& config.recaptcha_site_key.is_none()
|
&& !(config.recaptcha_site_key.is_some() && config.recaptcha_private_site_key.is_some())
|
||||||
{
|
{
|
||||||
return Err!(Config(
|
return Err!(Config(
|
||||||
"registration_token",
|
"registration_token",
|
||||||
|
|
|
@ -557,9 +557,8 @@ pub struct Config {
|
||||||
pub registration_token_file: Option<PathBuf>,
|
pub registration_token_file: Option<PathBuf>,
|
||||||
|
|
||||||
/// The public site key for reCaptcha. If this is provided, reCaptcha
|
/// The public site key for reCaptcha. If this is provided, reCaptcha
|
||||||
/// becomes required during registration. If both captcha *and*
|
/// becomes required during registration, **even if token registration is
|
||||||
/// registration token are enabled, both will be required during
|
/// enabled**.
|
||||||
/// registration.
|
|
||||||
///
|
///
|
||||||
/// IMPORTANT: "Verify the origin of reCAPTCHA solutions" **MUST** BE
|
/// IMPORTANT: "Verify the origin of reCAPTCHA solutions" **MUST** BE
|
||||||
/// DISABLED IF YOU WANT THE CAPTCHA TO WORK IN 3RD PARTY CLIENTS, OR
|
/// DISABLED IF YOU WANT THE CAPTCHA TO WORK IN 3RD PARTY CLIENTS, OR
|
||||||
|
|
|
@ -192,7 +192,7 @@ pub async fn try_auth(
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
| Ok(()) => {
|
| Ok() => {
|
||||||
uiaainfo.completed.push(AuthType::ReCaptcha);
|
uiaainfo.completed.push(AuthType::ReCaptcha);
|
||||||
},
|
},
|
||||||
| Err(e) => {
|
| Err(e) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue