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"
|
||||
dependencies = [
|
||||
"actix-service",
|
||||
"actix-session",
|
||||
"actix-session 0.10.1",
|
||||
"actix-utils",
|
||||
"actix-web",
|
||||
"derive_more 1.0.0",
|
||||
@@ -189,6 +189,23 @@ dependencies = [
|
||||
"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]]
|
||||
name = "actix-utils"
|
||||
version = "3.0.1"
|
||||
@@ -590,7 +607,7 @@ dependencies = [
|
||||
"actix",
|
||||
"actix-identity",
|
||||
"actix-remote-ip",
|
||||
"actix-session",
|
||||
"actix-session 0.11.0",
|
||||
"actix-web",
|
||||
"askama",
|
||||
"base32",
|
||||
|
@@ -90,9 +90,8 @@ where
|
||||
// Check if POST request comes from another website (block invalid origins)
|
||||
let origin = req.headers().get(header::ORIGIN);
|
||||
if req.method() == Method::POST && req.path() != TOKEN_URI && req.path() != USERINFO_URI
|
||||
{
|
||||
if let Some(o) = origin {
|
||||
if !o
|
||||
&& let Some(o) = origin
|
||||
&& !o
|
||||
.to_str()
|
||||
.unwrap_or("bad")
|
||||
.eq(&AppConfig::get().website_origin)
|
||||
@@ -104,8 +103,6 @@ where
|
||||
.map_into_right_body(),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if req.path().starts_with("/.git") {
|
||||
return Ok(req.into_response(
|
||||
|
Reference in New Issue
Block a user