You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A throwing plugin leaves the paste row stuck in LOADING state. The plugin loop in PasteReleaseService.releaseLocalPasteData has no exception isolation. For example, FilesToImagesPlugin throws IllegalStateException when a file move fails, which aborts the whole loop: the row is never marked deleted nor updated to loaded, so it stays invisible and unrecoverable.
The order of pasteProcessPlugins is load-bearing but undocumented. Several invariants are easy to break silently, e.g. DiscardOversizedNonFilePlugin must precede DistinctPlugin (otherwise FirstPlugin may keep an oversized first item and clear a smaller surviving variant from disk before the oversized one is discarded), generate plugins must never emit items larger than their already-size-checked sources, and SortPlugin must be last because the first item determines the row's type/hash/search content. Mobile assembles the same commonMain plugins and must keep the same invariants.
Follow-up hardening after #4698 / #4699.
Problems
A throwing plugin leaves the paste row stuck in LOADING state. The plugin loop in
PasteReleaseService.releaseLocalPasteDatahas no exception isolation. For example,FilesToImagesPluginthrowsIllegalStateExceptionwhen a file move fails, which aborts the whole loop: the row is never marked deleted nor updated to loaded, so it stays invisible and unrecoverable.The order of
pasteProcessPluginsis load-bearing but undocumented. Several invariants are easy to break silently, e.g.DiscardOversizedNonFilePluginmust precedeDistinctPlugin(otherwiseFirstPluginmay keep an oversized first item and clear a smaller surviving variant from disk before the oversized one is discarded), generate plugins must never emit items larger than their already-size-checked sources, andSortPluginmust be last because the first item determines the row's type/hash/search content. Mobile assembles the same commonMain plugins and must keep the same invariants.maxNonFilePasteSizeaccepts any positive value. Without an upper bound, the setting can effectively disable the oversized-item guard introduced in Discard oversized non-file paste items to prevent huge database rows #4698.Changes
runCatching: on failure, log a warning and continue with the current items instead of aborting the release.Counterinput formaxNonFilePasteSizeto 1..64 MB.