mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-19 23:07:29 +00:00
🩹(backend) ignore non-recording uploads in storage webhook handler
With the introduction of background file uploads, a misconfigured MinIO webhook could trigger the storage hook endpoint for unrelated files. While the dev setup now filters events via the MinIO lifecycle configuration, add a safeguard at the application level. Enforce a stricter filepath regex when parsing storage hook events and ignore files outside the recording output directory. Return a clean 200 response to acknowledge the webhook while avoiding unnecessary processing.
This commit is contained in:
@@ -88,7 +88,7 @@ class MinioParser:
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
self._filepath_regex = re.compile(
|
||||
rf"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?(?P<recording_id>{UUID_REGEX})\.(?P<extension>{FILE_EXT_REGEX})"
|
||||
rf"(?P<url_encoded_folder_path>(?:[^%]+%2F)+)?{settings.RECORDING_OUTPUT_FOLDER}%2F(?P<recording_id>{UUID_REGEX})\.(?P<extension>{FILE_EXT_REGEX})"
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user