Merge branch 'develop' of https://github.com/pterodactyl/wings into develop

This commit is contained in:
Dane Everitt 2020-11-10 20:36:42 -08:00
commit 488ef9de54
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -49,7 +49,9 @@ func (s *Server) customMounts() []environment.Mount {
mounted := false mounted := false
for _, allowed := range config.Get().AllowedMounts { for _, allowed := range config.Get().AllowedMounts {
if !strings.HasPrefix(source, allowed) { // Check if the source path is included in the allowed mounts list.
// filepath.Clean will strip all trailing slashes (unless the path is a root directory).
if !strings.HasPrefix(source, filepath.Clean(allowed)) {
continue continue
} }