|
|
|
|
@ -39,6 +39,8 @@ var MaxDecompressedChartSize int64 = 100 * 1024 * 1024 // Default 100 MiB
|
|
|
|
|
|
|
|
|
|
// MaxDecompressedFileSize is the size of the largest file that Helm will attempt to load.
|
|
|
|
|
// The size of the file is the decompressed version of it when it is stored in an archive.
|
|
|
|
|
//
|
|
|
|
|
// Deprecated: This variable is no longer used internally and will be removed in Helm v5.
|
|
|
|
|
var MaxDecompressedFileSize int64 = 5 * 1024 * 1024 // Default 5 MiB
|
|
|
|
|
|
|
|
|
|
var drivePathPattern = regexp.MustCompile(`^[a-zA-Z]:/`)
|
|
|
|
|
@ -128,10 +130,6 @@ func LoadArchiveFiles(in io.Reader) ([]*BufferedFile, error) {
|
|
|
|
|
return nil, fmt.Errorf("decompressed chart is larger than the maximum size %d", MaxDecompressedChartSize)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if hd.Size > MaxDecompressedFileSize {
|
|
|
|
|
return nil, fmt.Errorf("decompressed chart file %q is larger than the maximum file size %d", hd.Name, MaxDecompressedFileSize)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
limitedReader := io.LimitReader(tr, remainingSize)
|
|
|
|
|
|
|
|
|
|
bytesWritten, err := io.Copy(b, limitedReader)
|
|
|
|
|
|