We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
..
1 parent c62f191 commit 492de92Copy full SHA for 492de92
1 file changed
server/router.go
@@ -72,7 +72,7 @@ func esmRouter(db Database, esmStorage storage.Storage, logger *log.Logger) rex.
72
pathname := ctx.R.URL.Path
73
74
// ban malicious requests
75
- if strings.HasPrefix(pathname, "/.") || strings.HasSuffix(pathname, ".env") || strings.HasSuffix(pathname, ".php") {
+ if strings.HasSuffix(pathname, ".env") || strings.HasSuffix(pathname, ".php") || strings.Contains(pathname, "/.") {
76
return rex.Status(404, "not found")
77
}
78
0 commit comments