Skip to content

Conversation

@carlos-schmidt
Copy link
Contributor

When trying to seed FA³ST service with an .aasx-file containing PDFs which are very compressed, a ZIP bomb exception can be thrown. For this, a fix has already been applied. However, for the case where this .aasx-file is submitted with the configuration's initialModelFile value, the model is validate (and thus opened) before the inflate ratio is adjusted, yielding in the same ZIP bomb exception.

Since validate() only validates the model and not the rest of the config, I am proposing to set the minInflateRatio before validating the configuration.

A possible addition to this PR would be to somehow validate the configuration's minInflateRatio (e.g., >=0).

@sonarqubecloud
Copy link

Copy link
Member

@mjacoby mjacoby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be aware that FA³ST Service can also be used from code by manually creating a Service instance without using the App class from the starter module. The proposed solution would not work in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants