mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-24 11:20:18 +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
|
||||
|
||||
r, _, err := s.storage.Get(token, fmt.Sprintf("%s.metadata", filename))
|
||||
if s.storage.IsNotExist(err) {
|
||||
return metadata, nil
|
||||
} else if err != nil {
|
||||
if err != nil {
|
||||
return metadata, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue