Repository navigation
Preserve notification images from localhost file URLs - #13730
Inference1 wants to merge 1 commit into
Conversation
|
Would you please review this pr |
Independent community review
Tested: Result: The change behaved as expected. The base branch reproduces the issue: passing Testing details
|
|
Reviewed at 9452128 against Reproduced on an Omarchy worker VM. With base, Tests on the worker: Second opinion: Codex Medium reviewed the diff and found no defect. It checked lookalike hosts, No other open pull request fixes this. #12111 rewrites the same Labelled |
|
Re-reviewed against
One related point is now the maintainer's call rather than a port of this change. The new This was checked by reading |
Notifications using
file://localhost/tmp/avatar.pngkeep referencing the sender's original file instead of copying it into the notification state directory. If the sender deletes that file, the persisted notification loses its image.localImageFile()removesfile://but then rejects the remaininglocalhost/...because it does not start with/.Recognize an exact, case-insensitive
localhostauthority before decoding the path. This lets the existing persistence flow copy bothappIconandimagevalues and restore them from the cache. Other host authorities remain rejected; themed icons andimage://handling are unchanged. This follows the local-file semantics in RFC 8089.Regression coverage checks lowercase/uppercase localhost, percent-encoded spaces, single decoding, remote/lookalike hosts, both image roles, serialization/restoration, repeat persistence, and preservation of the live snapshot.
Validation:
bash test/shell.d/notifications-test.sh: 152 assertions pass with Node 20.20.2 and Git Bash 5.2.26 on Windows, using a test-launcher-only conversion ofROOTto a Windows path. The new regression fails on the base revision.Service.qmlpersistence function and copy script with Node/Git Bash, replacing only queue scheduling with synchronous execution. Before the fix no cache file was produced; afterwards the persisted PNG remained byte-for-byte intact after deleting the sender's source.git diff --checkpasses.