Fix cargo clippy issue
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
21
Cargo.lock
generated
21
Cargo.lock
generated
@@ -90,7 +90,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "23b8ddc6f6a8b19c4016aaa13519968da9969bc3bc1c1c883cdb0f25dd6c8cf7"
|
checksum = "23b8ddc6f6a8b19c4016aaa13519968da9969bc3bc1c1c883cdb0f25dd6c8cf7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-service",
|
"actix-service",
|
||||||
"actix-session",
|
"actix-session 0.10.1",
|
||||||
"actix-utils",
|
"actix-utils",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"derive_more 1.0.0",
|
"derive_more 1.0.0",
|
||||||
@@ -189,6 +189,23 @@ dependencies = [
|
|||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "actix-session"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "400c27fd4cdbe0082b7bbd29ac44a3070cbda1b2114138dc106ba39fe2f90dff"
|
||||||
|
dependencies = [
|
||||||
|
"actix-service",
|
||||||
|
"actix-utils",
|
||||||
|
"actix-web",
|
||||||
|
"anyhow",
|
||||||
|
"derive_more 2.0.1",
|
||||||
|
"rand 0.9.2",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-utils"
|
name = "actix-utils"
|
||||||
version = "3.0.1"
|
version = "3.0.1"
|
||||||
@@ -590,7 +607,7 @@ dependencies = [
|
|||||||
"actix",
|
"actix",
|
||||||
"actix-identity",
|
"actix-identity",
|
||||||
"actix-remote-ip",
|
"actix-remote-ip",
|
||||||
"actix-session",
|
"actix-session 0.11.0",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"askama",
|
"askama",
|
||||||
"base32",
|
"base32",
|
||||||
|
@@ -90,9 +90,8 @@ where
|
|||||||
// Check if POST request comes from another website (block invalid origins)
|
// Check if POST request comes from another website (block invalid origins)
|
||||||
let origin = req.headers().get(header::ORIGIN);
|
let origin = req.headers().get(header::ORIGIN);
|
||||||
if req.method() == Method::POST && req.path() != TOKEN_URI && req.path() != USERINFO_URI
|
if req.method() == Method::POST && req.path() != TOKEN_URI && req.path() != USERINFO_URI
|
||||||
{
|
&& let Some(o) = origin
|
||||||
if let Some(o) = origin {
|
&& !o
|
||||||
if !o
|
|
||||||
.to_str()
|
.to_str()
|
||||||
.unwrap_or("bad")
|
.unwrap_or("bad")
|
||||||
.eq(&AppConfig::get().website_origin)
|
.eq(&AppConfig::get().website_origin)
|
||||||
@@ -104,8 +103,6 @@ where
|
|||||||
.map_into_right_body(),
|
.map_into_right_body(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if req.path().starts_with("/.git") {
|
if req.path().starts_with("/.git") {
|
||||||
return Ok(req.into_response(
|
return Ok(req.into_response(
|
||||||
|
Reference in New Issue
Block a user