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 d50c07a commit 7abd242Copy full SHA for 7abd242
local/php/envs.go
@@ -23,6 +23,7 @@ import (
23
"net"
24
"net/http"
25
"os"
26
+ "path"
27
"path/filepath"
28
"strings"
29
@@ -38,7 +39,7 @@ func (p *Server) generateEnv(req *http.Request) map[string]string {
38
39
40
pathInfo := req.URL.Path
41
if pos := strings.Index(strings.ToLower(pathInfo), ".php"); pos != -1 {
- file := filepath.Clean(pathInfo[:pos+4])
42
+ file := path.Clean(pathInfo[:pos+4])
43
if _, err := os.Stat(filepath.Join(p.documentRoot, file)); err == nil {
44
scriptName = file
45
pathInfo = pathInfo[pos+4:]
0 commit comments