Merge branch 'dev'
This commit is contained in:
commit
aa79df7461
1 changed files with 4 additions and 5 deletions
9
main.go
9
main.go
|
@ -574,11 +574,10 @@ func CheckRequest(app *model.AppState, next http.Handler) http.Handler {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// same with .php and awkward double-slash requests.
|
// obviously .php requests these don't affect me, but these tend to be
|
||||||
// obviously these don't affect me, but these tend to be lazy intrusion
|
// lazy wordpress intrusion attempts. if that's what you're about, i
|
||||||
// attempts. if that's what you're about, i don't want you on my site.
|
// don't want you on my site.
|
||||||
if strings.HasPrefix(r.URL.Path, "//") ||
|
if strings.HasSuffix(r.URL.Path, ".php") ||
|
||||||
strings.HasSuffix(r.URL.Path, ".php") ||
|
|
||||||
strings.HasSuffix(r.URL.Path, ".php7") {
|
strings.HasSuffix(r.URL.Path, ".php7") {
|
||||||
http.NotFound(w, r)
|
http.NotFound(w, r)
|
||||||
fmt.Fprintf(
|
fmt.Fprintf(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue