forked from WhiskeySockets/Baileys
-
Notifications
You must be signed in to change notification settings - Fork 22
sync: master → develop 2026-06-14 — pull #546 release + auto-version bumps #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
373a6f3
fix(memory): handle ECACHEFULL on userDevicesCache.set in device-noti…
rsalcara 424260a
release: develop → master 2026-06-06 (v2) — #509 + #510 + #511 + #512…
rsalcara 44b7c91
chore: update proto/version to v2.3000.1040989513 (#516)
github-actions[bot] b5d1bab
chore: update WhatsApp Web version to v2.3000.1040994085 (#517)
rsalcara bb61401
release: develop → master 2026-06-08 — #514 + #515 + #518 + #519 + #520
rsalcara 7f5d723
fix(audit #521): 3 P2 + 2 P3 from chatgpt/copilot/coderabbit review
rsalcara 4214847
fix(audit #521): close cubic threads 8 + 9 (Issues D, E)
rsalcara b2c5abf
fix(lint): satisfy eqeqeq + remove unused isJidGroup import
rsalcara 2ec8ba3
fix(audit #521): close cubic thread 13 — narrow OrphanMsmsg guard
rsalcara 285db59
release: develop → master 2026-06-08 (5 PRs)
rsalcara c4ea52a
chore: update proto/version to v2.3000.1041008395 (#524)
github-actions[bot] 3d5a7bd
chore: update WhatsApp Web version to v2.3000.1041011968 (#525)
rsalcara 6c882ba
chore: update proto/version to v2.3000.1041063798 (#527)
github-actions[bot] 5290713
chore: update WhatsApp Web version to v2.3000.1041103517 (#528)
rsalcara 97cd676
chore: update proto/version to v2.3000.1041168064 (#530)
github-actions[bot] 1392734
chore: update WhatsApp Web version to v2.3000.1041187577 (#531)
rsalcara 0c84960
chore: update proto/version to v2.3000.1041257863 (#539)
github-actions[bot] 41b245c
chore: update WhatsApp Web version to v2.3000.1041271747 (#540)
rsalcara 2fca0f5
chore: update proto/version to v2.3000.1041336118 (#541)
github-actions[bot] 17f7941
chore: update WhatsApp Web version to v2.3000.1041353304 (#542)
rsalcara 0d867b4
chore: update proto/version to v2.3000.1041410692 (#543)
github-actions[bot] bd38378
chore: update WhatsApp Web version to v2.3000.1041420778 (#544)
rsalcara 7fdf189
chore: merge master version bumps into release branch
rsalcara 8b0176b
fix(PR #546 audit): tr range BLOCKER + 5 VoIP P1s + JID-HOSTED-P2 + 4…
rsalcara 92fd102
chore: update proto/version to v2.3000.1041433777 (#547)
github-actions[bot] f7b4127
chore: update WhatsApp Web version to v2.3000.1041437765 (#548)
rsalcara 53cbf63
fix(audit r6): FU-04 varint 5-byte overflow + FU-06 port upper-bound …
rsalcara 6303c2d
release: develop → master 2026-06-13 — VoIP + 6 audit batches + versi…
rsalcara 91df359
sync: master → develop 2026-06-14 — pull #546 release + auto-version …
rsalcara File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"version":[2,3000,1041103517]} | ||
| {"version":[2,3000,1041437765]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -273,6 +273,7 @@ export class SignalingBridge { | |
| const encCount = parseCountAttr(rootEnc?.attrs.count) | ||
| let includeDeviceIdentity = false | ||
|
|
||
| let encryptionFailed = false | ||
| for (const destNode of destinations) { | ||
| const targetJid = String(destNode.attrs.jid ?? '').trim() | ||
| const destEnc = getBinaryNodeChild(destNode, 'enc') | ||
|
|
@@ -283,10 +284,18 @@ export class SignalingBridge { | |
| setNodeChildren(destNode, [encrypted.encNode]) | ||
| } catch { | ||
| for (const d of destinations) removeNodeChildrenByTag(d, 'enc') | ||
| encryptionFailed = true | ||
| break | ||
| } | ||
| } | ||
|
|
||
| // If ANY destination failed to encrypt, we already stripped the | ||
| // `enc` children from every destination — pushing the stanza now | ||
| // would deliver a key-less offer that the peer can't decrypt, | ||
| // failing the call setup silently. Bail instead so the upstream | ||
| // caller can surface the failure. | ||
| if (encryptionFailed) return | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Early return on multi-destination encryption failure drops signaling without notifying WASM. This can leave call setup hanging instead of surfacing an immediate failure. Prompt for AI agents |
||
|
|
||
| if (includeDeviceIdentity) this.#appendDeviceIdentity(voipNode) | ||
|
|
||
| await this.#sendCallStanza(this.#toBareJid(peerJid), voipNode, signalingTag, effectivePeerJid, peerJid) | ||
|
|
@@ -590,15 +599,23 @@ export class SignalingBridge { | |
| const { jidDecode, jidEncode } = this.#baileys | ||
| const decoded = jidDecode(jid) | ||
| if (!decoded?.user) return jid | ||
| const server = jid.endsWith('@lid') ? 'lid' : 's.whatsapp.net' | ||
| // `decoded.server` already captures the parsed domain — using it | ||
| // avoids the previous `endsWith('@lid')` check that misclassified | ||
| // hosted-LID accounts (`*.@hosted.lid`, device 99) as PNs and | ||
| // silently rewrote them to `@s.whatsapp.net`. | ||
| const server = decoded.server === 'lid' || decoded.server === 'hosted.lid' ? decoded.server : 's.whatsapp.net' | ||
| return jidEncode(decoded.user, server) | ||
| } | ||
|
|
||
| #toCallDeviceJid = (jid: string): string => { | ||
| const { jidDecode, jidEncode } = this.#baileys | ||
| const decoded = jidDecode(jid) | ||
| if (!decoded?.user) return jid | ||
| const server = jid.endsWith('@lid') ? 'lid' : 's.whatsapp.net' | ||
| // `decoded.server` already captures the parsed domain — using it | ||
| // avoids the previous `endsWith('@lid')` check that misclassified | ||
| // hosted-LID accounts (`*.@hosted.lid`, device 99) as PNs and | ||
| // silently rewrote them to `@s.whatsapp.net`. | ||
| const server = decoded.server === 'lid' || decoded.server === 'hosted.lid' ? decoded.server : 's.whatsapp.net' | ||
| if (decoded.device == null) return jidEncode(decoded.user, server) | ||
| return `${decoded.user}:${decoded.device}@${server}` | ||
| } | ||
|
|
@@ -609,7 +626,11 @@ export class SignalingBridge { | |
| if (!decoded?.user) return undefined | ||
| const device = decoded.device | ||
| if (device == null || device === 0) return undefined | ||
| const server = jid.endsWith('@lid') ? 'lid' : 's.whatsapp.net' | ||
| // `decoded.server` already captures the parsed domain — using it | ||
| // avoids the previous `endsWith('@lid')` check that misclassified | ||
| // hosted-LID accounts (`*.@hosted.lid`, device 99) as PNs and | ||
| // silently rewrote them to `@s.whatsapp.net`. | ||
| const server = decoded.server === 'lid' || decoded.server === 'hosted.lid' ? decoded.server : 's.whatsapp.net' | ||
| return jidEncode(decoded.user, server) | ||
| } | ||
|
|
||
|
|
@@ -675,7 +696,11 @@ export class SignalingBridge { | |
| continue | ||
| } | ||
|
|
||
| const server = jid.endsWith('@lid') ? 'lid' : 's.whatsapp.net' | ||
| // `decoded.server` already captures the parsed domain — using it | ||
| // avoids the previous `endsWith('@lid')` check that misclassified | ||
| // hosted-LID accounts (`*.@hosted.lid`, device 99) as PNs and | ||
| // silently rewrote them to `@s.whatsapp.net`. | ||
| const server = decoded.server === 'lid' || decoded.server === 'hosted.lid' ? decoded.server : 's.whatsapp.net' | ||
| result.add(jidEncode(decoded.user, server)) | ||
| if (decoded.device != null) { | ||
| result.add(`${decoded.user}:${decoded.device}@${server}`) | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a reverse-only delete of an old LID, this queues a null write for the PN key resolved from
jid_mapwithout checking what the legacy inner forward entry currently contains. If that PN has since rotated to a newer LID that only exists in the legacy fallback store, deleting the whole PN key drops the still-validpn → newLidmapping; the forward delete should only be propagated when the inner forward value matches the LID being removed.Useful? React with 👍 / 👎.