mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-27 06:30:19 +01:00
Merge pull request #309 from cheeseandcereal/fix_arbitrary_reading
fix missing metadata security vuln
This commit is contained in:
commit
42adceb4c6
1 changed files with 1 additions and 3 deletions
|
@ -614,9 +614,7 @@ func (s *Server) CheckMetadata(token, filename string, increaseDownload bool) (M
|
||||||
var metadata Metadata
|
var metadata Metadata
|
||||||
|
|
||||||
r, _, err := s.storage.Get(token, fmt.Sprintf("%s.metadata", filename))
|
r, _, err := s.storage.Get(token, fmt.Sprintf("%s.metadata", filename))
|
||||||
if s.storage.IsNotExist(err) {
|
if err != nil {
|
||||||
return metadata, nil
|
|
||||||
} else if err != nil {
|
|
||||||
return metadata, err
|
return metadata, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue