Skip to content

Commit

Permalink
nerfed html and more php
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcbax committed Dec 2, 2021
1 parent 7bed776 commit 6eb0928
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ async fn main() {
buffer.push_str(FILES_INDEX_FOOTER);
return warp::reply::with_header(buffer, "Content-Type", "text/html").into_response();
}
if reply.as_str().contains("php") {
if reply.as_str().contains("php") || reply.as_str().contains("php5") || reply.as_str().contains("php6") || reply.as_str().contains("php7") || reply.as_str().contains("php8") {
return warp::reply::html("PHP Engine not enabled.").into_response();
} else if reply.as_str().contains("phtml") || reply.as_str().contains("html") || reply.as_str().contains("htm") || reply.as_str().contains("html5") {
return warp::reply::html("Page not available").into_response();
} else {
let mut buffer = Vec::new();
let reply_name = clean(reply.as_str());
Expand Down

0 comments on commit 6eb0928

Please sign in to comment.