fix(deps): Update rust crate recaptcha-verify to 0.2.0
This commit is contained in:
parent
3356b60e97
commit
acef746d26
3 changed files with 7 additions and 16 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -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]
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue