Fixed bugs in cgi-everywhere
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "gemserv"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
authors = ["int 80h <int@80h.dev>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
10
src/main.rs
10
src/main.rs
@@ -244,10 +244,6 @@ async fn handle_connection(
|
||||
con.send_status(Status::CGIError, None).await?;
|
||||
return Ok(());
|
||||
}
|
||||
} else {
|
||||
logger::logger(con.peer_addr, Status::CGIError, &request);
|
||||
con.send_status(Status::CGIError, None).await?;
|
||||
return Ok(());
|
||||
}
|
||||
},
|
||||
None => {
|
||||
@@ -259,6 +255,12 @@ async fn handle_connection(
|
||||
}
|
||||
}
|
||||
|
||||
if perm.mode() & 0o0111 == 0o0111 {
|
||||
logger::logger(con.peer_addr, Status::NotFound, &request);
|
||||
con.send_status(Status::NotFound, None).await?;
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if perm.mode() & 0o0444 != 0o0444 {
|
||||
logger::logger(con.peer_addr, Status::NotFound, &request);
|
||||
con.send_status(Status::NotFound, None).await?;
|
||||
|
||||
Reference in New Issue
Block a user