Skip to content

Commit 7abd242

Browse files
committed
Tweak previous commit
1 parent d50c07a commit 7abd242

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

local/php/envs.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"net"
2424
"net/http"
2525
"os"
26+
"path"
2627
"path/filepath"
2728
"strings"
2829

@@ -38,7 +39,7 @@ func (p *Server) generateEnv(req *http.Request) map[string]string {
3839

3940
pathInfo := req.URL.Path
4041
if pos := strings.Index(strings.ToLower(pathInfo), ".php"); pos != -1 {
41-
file := filepath.Clean(pathInfo[:pos+4])
42+
file := path.Clean(pathInfo[:pos+4])
4243
if _, err := os.Stat(filepath.Join(p.documentRoot, file)); err == nil {
4344
scriptName = file
4445
pathInfo = pathInfo[pos+4:]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy