[stable10] Backport of Add regex for shared object file names #34082
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The change in this PR adds regular expression which would consider shared object file with extension not just
.so
. We should also consider files with extension sayfoo.so.1.2
orfoo.1.2.so
orfoo.so
orfoo.so.
. The regular expression change acheives this.Related Issue
Motivation and Context
The extensions added to
resources/config/mimetypemapping.dist.json
would only help for files with single extension. But for the shared object files in GNU/Linux we may have.so
,.so.1.2
,.1.2.so
. For this we need a regular expression in the Detection.php to fix the problem of multiple extension.How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: