mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Backend: Upgrade dependencies and fix potential issues
This commit is contained in:
@@ -73,8 +73,8 @@ func Unzip(src, dest string) (fileNames []string, err error) {
|
||||
defer r.Close()
|
||||
|
||||
for _, f := range r.File {
|
||||
// Skip directories like __OSX
|
||||
if strings.HasPrefix(f.Name, "__") {
|
||||
// Skip directories like __OSX and potentially malicious file names containing "..".
|
||||
if strings.HasPrefix(f.Name, "__") || strings.Contains(f.Name, "..") {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user