[libtacky / Link Previews] OMEMO 0.3 fetches link preview resources even though the preview is not sent #18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[libtacky / Link Previews] OMEMO 0.3 fetches link preview resources even though the preview is not sent
Severity: Minor
Issue ID: LP-04i
Date: November 4, 2026
Device Status: Not Run — failure expected based on test-environment findings and build 94 source code
Summary
When Settings → Privacy → Link Previews is set to Others' and Mine, libtacky fetches the linked webpage and its preview image even when the outgoing conversation uses legacy OMEMO 0.3, which does not support transmitting the generated preview.
As a result, the destination website receives a request from the sender's device, potentially revealing its IP address and request timestamp, while the recipient receives no link preview.
The issue occurs because preview generation begins before the outgoing message's OMEMO profile is determined.
The default Others' Only setting does not trigger this sender-side behavior.
Affected component: libtacky,
message.tcl(outgoing message and preview generation).Environment
8f62071, branchfeat/ui-redesign, build 942f42a2f2/ v1.2.0-beta2b9e675dmain@example.local, libtacky application profilepeer2@example.local, OMEMO contactomemo set_mode legacy)link_previews always— Others' and Minehttps://page.lp.test/p4checks/lp_server.py, network namespace at1.2.3.4The test webpage uses a certificate signed by the test environment's CA, configured through
tls_ca_file.Preconditions
Steps to Reproduce
Run:
SWIFT_SRC=<anotherim-swift-build-94> SERVER_SRC=<anotherim-server> bash setup/run_all.sh run_link_previewThe test requires root privileges for
ip netns.LP-CTRL: Fetch
https://page.lp.test/ctrlthroughlinkmeta previewand confirm that the page server records the request.LP-02: Send a link using OMEMO 2 and confirm that the recipient receives the preview inside the encrypted envelope.
LP-04: Switch the conversation to legacy OMEMO:
omemo set_mode peer2 legacySend:
old https://page.lp.test/p4 hereInspect the page server's request log (
lp_requests_<run>.jsonl).Inspect the message received by
peer2for link preview metadata.Expected Behavior
If the selected encryption profile cannot transmit link preview metadata, the sender should skip preview generation entirely.
The linked webpage and its associated resources should not be fetched solely for a preview that will be discarded.
This follows the privacy considerations in XEP-0511 v0.1.1 §7, which explain that fetching a remote resource can disclose the sender's interest and network address.
libtacky also documents in
linkmeta.tcl:34-36that the legacy encryption profile does not carry additional preview metadata.The application's setting explains that a preview is generated by fetching the page from the device, establishing the intended relationship between the network request and preview functionality.
This is a privacy recommendation, not an explicitly documented product requirement.
Actual Behavior
The supplied test report identifies run
cb11caf1as reproducing the issue.The legacy-OMEMO message was sent at approximately 20:00:36 UTC on November 4, 2026.
Relevant evidence:
evidence/run_link_preview_1.outevidence/lp_requests_cb11caf1.jsonlevents_main_cb11caf1The outgoing message contained:
According to the reported behavior, libtacky initiated preview-resource fetching even though the legacy OMEMO profile did not include the generated preview in the outgoing message.
The supplied excerpt ends before the individual HTTP request records and received-message evidence. Those records should be attached to establish the exact resources fetched and confirm that the recipient received no preview.
Root Cause
Preview generation is initiated in libtacky's outgoing message processing before the final OMEMO encryption profile is known.
The legacy OMEMO profile cannot carry the additional link preview metadata, so the generated preview is omitted from the outgoing message.
However, the webpage request has already occurred.
This creates an unnecessary privacy disclosure: the sender's device contacts the website without delivering the preview that justified the request.
Suggested Fix
Determine whether the selected outgoing encryption profile supports link preview metadata before initiating any preview-related HTTP requests.
For legacy OMEMO 0.3:
Verification After Fix
Evidence and Status
Available evidence references:
evidence/run_link_preview_1.outevidence/lp_requests_cb11caf1.jsonlevents_main_cb11caf1checks/lp_server.pyautotests/metadata-audit/checks/run_link_preview.pyReported:
link_previews always.cb11caf1.Not independently established by the supplied excerpt:
Device status: Not Run.
Fixed in libtacky 1.2.0-rc3. The send decides the profile before it fetches: a page is fetched only when the message can carry the preview, that is in clear text or when the recipients get an OMEMO 2 envelope (a mixed chat too, the preview rides its OMEMO 2 part). Under OMEMO 0.3 alone, and while the chat's keys are still being fetched, nothing is fetched and the message goes without a preview. Secret chats (OTR, Telegram) and encrypted Matrix chats never fetched.
linkmeta previewis unchanged: it names no chat and is the app's explicit request.