-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
asset_uri_whitelist
regex backtracking issue, add more extensio…
…ns (#270) ### Public-Facing Changes Fix exponential regex backtracking issue with default `asset_uri_whitelist` ### Description When fetching the asset `package://foxglove_simulation/meshes/kinect_jpg` I noticed that I never got a response. It turned out that the reason for this was due to catastrophic backtracking caused by the default `asset_uri_whitelist` regular expression pattern. The default pattern contains nested quantifiers with alternations, which can lead to exponential backtracking. This can cause the program to hang or freeze when trying to match certain input strings. This PR changes the default `asset_uri_whitelist` regex pattern to avoid catastrophic backtracking. It additionally adds a couple more extensions to e.g. allow for retrieval of texture files.
- Loading branch information
Showing
5 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters