Develop#653
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a few targeted improvements to file upload validation, media metadata extraction, and utility robustness. The most significant changes are the stricter validation of folder names during uploads, enhanced extraction of image creation dates using EXIF metadata, and improved command construction for ffprobe invocations.
File upload validation:
public_upload_video,public_upload_videoChunked,upload_video,upload_videoChunked) to reject folder names containing spaces, in addition to slashes and parent directory references. This helps prevent accidental or malicious folder naming issues. [1] [2] [3] [4]secure_filenameinhelpers.pyto replace whitespace characters with hyphens, further sanitizing filenames.Media metadata extraction and utility improvements:
util.py(extract_date_from_image_fileand_extract_date_from_image_exif), with fallback to filename patterns and file modification time. Updatedscan_imageincli.pyto use this improved extraction method. [1] [2]get_media_infoand_extract_date_from_metadatato use argument lists instead of string splitting, improving reliability and error handling. [1] [2]Other improvements:
create_posterswhere a missing duration could cause a crash, by defaulting to zero if the video duration isNone.1.6.14in bothpackage.jsonandpackage-lock.json. [1] [2]