1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2024-04-24 18:25:24 +03:00
parent 6167d3ed6b
commit d88273ab55
3 changed files with 28 additions and 18 deletions

View File

@@ -4,7 +4,6 @@ import (
"io/fs"
"net/http"
"net/url"
"path"
"regexp"
"strings"
"time"
@@ -326,7 +325,7 @@ type prefixedDir struct {
}
func (p *prefixedDir) Open(name string) (http.File, error) {
destPath, filename, ok, err := context.SafeFilename(p.prefix, name)
destPath, _, ok, err := context.SafeFilename(p.prefix, name)
if err != nil {
return nil, err
}
@@ -334,8 +333,8 @@ func (p *prefixedDir) Open(name string) (http.File, error) {
return nil, http.ErrMissingFile // unsafe.
}
name = path.Join(destPath, filename)
return p.fs.Open(name)
// name = path.Join(destPath, filename)
return p.fs.Open(destPath)
}
type partyConfiguratorMiddleware struct {