internal/helm: check size of meta files in package
Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
parent
87c7c80e0a
commit
ee1cb49b0c
|
|
@ -228,6 +228,9 @@ func LoadChartMetadataFromArchive(archive string) (*helmchart.Metadata, error) {
|
|||
|
||||
switch parts[1] {
|
||||
case chartutil.ChartfileName, "requirements.yaml":
|
||||
if hd.Size > helm.MaxChartFileSize {
|
||||
return nil, fmt.Errorf("size of '%s' exceeds '%d' bytes limit", hd.Name, helm.MaxChartFileSize)
|
||||
}
|
||||
b, err := io.ReadAll(tr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Reference in New Issue