Add check for processing recursive data structures (#14897)

This commit is contained in:
JPVenson 2025-10-02 02:26:56 +03:00 committed by GitHub
parent d6cebf1e67
commit cce6bf27e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,6 +337,11 @@ namespace MediaBrowser.Controller.Entities
try try
{ {
if (GetParents().Any(f => f.Id.Equals(Id)))
{
throw new InvalidOperationException("Recursive datastructure detected abort processing this item.");
}
await ValidateChildrenInternal2(progress, recursive, refreshChildMetadata, allowRemoveRoot, refreshOptions, directoryService, cancellationToken).ConfigureAwait(false); await ValidateChildrenInternal2(progress, recursive, refreshChildMetadata, allowRemoveRoot, refreshOptions, directoryService, cancellationToken).ConfigureAwait(false);
} }
finally finally