-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: enhance clip name sanitization and path handling in media h…
…andler - Improved the `sanitizeClipName` function to handle path traversal attempts more robustly, including case-insensitive checks for Windows compatibility. - Added normalization of path separators and ensured the removal of the 'clips/' prefix is case-insensitive. - Enhanced the `getFullPath` and `getSpectrogramPath` functions for consistent path handling and validation. - Implemented checks for final path length to prevent exceeding system limits. - Added detailed debug logging for better traceability during path sanitization and file existence checks.
- Loading branch information
Showing
1 changed file
with
136 additions
and
33 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