SAP / terraform-exporter-btp

The Terraform Exporter for SAP BTP is a tool that helps export resources from a SAP BTP account. It generates Terraform scripts for the import of resources and enables the import of the Terraform state.
https://sap.github.io/terraform-exporter-btp/
Apache License 2.0
3 stars 0 forks source link

[Security] Add file size check for JSON Upload #153

Closed lechnerc77 closed 2 weeks ago

lechnerc77 commented 2 weeks ago

Add a file size check for the uploaded/opened JSON file. In case a certain limit is exceeded, abort the process and raise an error message

github-actions[bot] commented 2 weeks ago

Thanks for the feature request. We evaluate it and update the issue accordingly.

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

lechnerc77 commented 2 weeks ago
fi, err := os.Stat("/path/to/file")
if err != nil {
    return err
}
// get the size
size := fi.Size()