🚀 Update (0.4) #5
Pinned
Saganaki22
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In this update, we’ve implemented several improvements to ensure safer and more robust handling of filenames generated from user prompts. The key changes are:
Filename Length Control:
📏 Truncated long prompts to a maximum of 50 characters for the generated filename, preventing excessively long filenames.
Enhanced Sanitization:
🔒 Applied stringent sanitization rules to replace non-alphanumeric characters in the prompt with underscores (_), ensuring safe and valid filenames.
🚫 Prevented directory traversal and injection attacks by removing potentially harmful characters and sequences from the filenames.
Unique Filename Generation:
🆔 Introduced a mechanism to append numeric suffixes to filenames when a file with the generated name already exists, ensuring each audio file is saved with a unique name without overwriting existing files.
Safe Directory Handling:
📂 Ensured the use of secure methods for path creation and directory handling to avoid any risks associated with user input influencing file paths.
These updates enhance the security and reliability of the file generation process, making the system more robust against various forms of file-related attacks and ensuring consistent operation even with diverse input prompts.
You can view and use the updated code in the repository. As always, we appreciate your feedback and contributions!
Beta Was this translation helpful? Give feedback.
All reactions