mirror of
https://github.com/distribution/distribution.git
synced 2026-02-21 22:34:05 +00:00
The newIgnoredSink function had a bug where it would return the unfiltered sink when the mediatypes list was empty, even if ignoreActions was populated. This made it impossible to filter events by action alone. This fix changes the early return condition to check both parameters: - Only returns unfiltered sink when BOTH are empty - Allows filtering by actions alone - Allows filtering by mediatypes alone - Maintains existing OR logic when both are specified Added test cases specifically for the edge case of empty mediatypes with populated actions list. Updated documentation to clarify how the filtering works and that the two parameters work independently. Fixes: #4729 Signed-off-by: Adrian Callejas <acallejaszu@gmail.com>