mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix(deps): Update rust crate recaptcha-verify to 0.2.0
This commit is contained in:
@@ -121,7 +121,7 @@ webpage.workspace = true
|
||||
webpage.optional = true
|
||||
blurhash.workspace = true
|
||||
blurhash.optional = true
|
||||
recaptcha-verify = { version = "0.1.5", default-features = false }
|
||||
recaptcha-verify = { version = "0.2.0", default-features = false }
|
||||
yansi.workspace = true
|
||||
|
||||
[target.'cfg(all(unix, target_os = "linux"))'.dependencies]
|
||||
|
||||
+4
-13
@@ -181,20 +181,11 @@ pub async fn try_auth(
|
||||
uiaainfo.completed.push(AuthType::Password);
|
||||
},
|
||||
| AuthData::ReCaptcha(r) => {
|
||||
if self.services.config.recaptcha_private_site_key.is_none() {
|
||||
let Some(ref private_site_key) = self.services.config.recaptcha_private_site_key
|
||||
else {
|
||||
return Err!(Request(Forbidden("ReCaptcha is not configured.")));
|
||||
}
|
||||
match recaptcha_verify::verify(
|
||||
self.services
|
||||
.config
|
||||
.recaptcha_private_site_key
|
||||
.as_ref()
|
||||
.unwrap(),
|
||||
r.response.as_str(),
|
||||
None,
|
||||
)
|
||||
.await
|
||||
{
|
||||
};
|
||||
match recaptcha_verify::verify_v3(private_site_key, r.response.as_str(), None).await {
|
||||
| Ok(()) => {
|
||||
uiaainfo.completed.push(AuthType::ReCaptcha);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user