Fix replication pause, multipart cache, and select all with virtual scroll

This commit is contained in:
2025-12-29 14:46:06 +08:00
parent e89bbb62dc
commit 1cacb80dd6
3 changed files with 34 additions and 28 deletions

View File

@@ -306,6 +306,12 @@ class ReplicationManager:
if self._shutdown:
return
# Re-check if rule is still enabled (may have been paused after task was submitted)
current_rule = self.get_rule(bucket_name)
if not current_rule or not current_rule.enabled:
logger.debug(f"Replication skipped for {bucket_name}/{object_key}: rule disabled or removed")
return
if ".." in object_key or object_key.startswith("/") or object_key.startswith("\\"):
logger.error(f"Invalid object key in replication (path traversal attempt): {object_key}")
return

View File

@@ -1052,9 +1052,10 @@ class ObjectStorage:
pass
shutil.rmtree(upload_root, ignore_errors=True)
self._invalidate_bucket_stats_cache(bucket_id)
self._invalidate_object_cache(bucket_id)
stat = destination.stat()
return ObjectMeta(
key=safe_key.as_posix(),