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:
Generated
+2
-2
@@ -4156,9 +4156,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "recaptcha-verify"
|
name = "recaptcha-verify"
|
||||||
version = "0.1.6"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0d694033c2b0abdbb8893edfb367f16270e790be4a67e618206d811dbe4efee4"
|
checksum = "409bf11a93fe93093f3c0254aab67576524f1e0524692615b5b63091dbc88a79"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ webpage.workspace = true
|
|||||||
webpage.optional = true
|
webpage.optional = true
|
||||||
blurhash.workspace = true
|
blurhash.workspace = true
|
||||||
blurhash.optional = 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
|
yansi.workspace = true
|
||||||
|
|
||||||
[target.'cfg(all(unix, target_os = "linux"))'.dependencies]
|
[target.'cfg(all(unix, target_os = "linux"))'.dependencies]
|
||||||
|
|||||||
+4
-13
@@ -181,20 +181,11 @@ pub async fn try_auth(
|
|||||||
uiaainfo.completed.push(AuthType::Password);
|
uiaainfo.completed.push(AuthType::Password);
|
||||||
},
|
},
|
||||||
| AuthData::ReCaptcha(r) => {
|
| 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.")));
|
return Err!(Request(Forbidden("ReCaptcha is not configured.")));
|
||||||
}
|
};
|
||||||
match recaptcha_verify::verify(
|
match recaptcha_verify::verify_v3(private_site_key, r.response.as_str(), None).await {
|
||||||
self.services
|
|
||||||
.config
|
|
||||||
.recaptcha_private_site_key
|
|
||||||
.as_ref()
|
|
||||||
.unwrap(),
|
|
||||||
r.response.as_str(),
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
| Ok(()) => {
|
| Ok(()) => {
|
||||||
uiaainfo.completed.push(AuthType::ReCaptcha);
|
uiaainfo.completed.push(AuthType::ReCaptcha);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user