Skip to content

Conversation

@alkur-gh
Copy link

Current implementation globs over the entire root directory, but needs files only with the given prefix. Globbing over the entire root directory is very slow in case of a large number of files. 'Path.resolve()' is used in an attempt to protect against directory traversal.

We had about 5 million files under the root directory for backups, so it took about 30 minutes to just list backups. After this fix, the time was reduced to 1-2 minutes.

Fixes #522 for LocalStorage.

@adejanovski
Copy link
Contributor

adejanovski commented Oct 21, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@alkur-gh

This comment was marked as resolved.

@alkur-gh alkur-gh force-pushed the master branch 3 times, most recently from 22a0dcc to 8a414b2 Compare October 22, 2025 06:25
Current implementation globs over the entire root directory, but needs
files only with the given prefix. Globbing over the entire root
directory is very slow in case of a large number of files. 'Path.resolve()'
is used in an attempt to protect against directory traversal.
@sonarqubecloud
Copy link

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.

medusa list-backups works very slow

2 participants