|
@@ -2,6 +2,7 @@ package user
|
|
|
|
|
|
import (
|
|
import (
|
|
"errors"
|
|
"errors"
|
|
|
|
+ "log"
|
|
"os"
|
|
"os"
|
|
"path/filepath"
|
|
"path/filepath"
|
|
"strings"
|
|
"strings"
|
|
@@ -108,6 +109,7 @@ func (u *User) RealPathToVirtualPath(rpath string) (string, error) {
|
|
allowSpecialCasePassThrough := false
|
|
allowSpecialCasePassThrough := false
|
|
for _, fsh := range userFsHandlers {
|
|
for _, fsh := range userFsHandlers {
|
|
thisVrootPath := fsh.Path
|
|
thisVrootPath := fsh.Path
|
|
|
|
+ log.Println(filepath.ToSlash(realPath[:len(thisVrootPath)]), thisVrootPath)
|
|
if len(realPath) > len(thisVrootPath) && filepath.ToSlash(realPath[:len(thisVrootPath)]) == filepath.ToSlash(thisVrootPath) {
|
|
if len(realPath) > len(thisVrootPath) && filepath.ToSlash(realPath[:len(thisVrootPath)]) == filepath.ToSlash(thisVrootPath) {
|
|
allowSpecialCasePassThrough = true
|
|
allowSpecialCasePassThrough = true
|
|
}
|
|
}
|