Conversation
Contributor
Greptile SummaryAuto-allowlists the configured BlueBubbles
Confidence Score: 5/5
Last reviewed commit: 263cf03 |
Contributor
|
Security review note: I like the direction here (auto-allowlisting the configured BlueBubbles Evidence I checked:
Two hardening asks before merge:
|
Contributor
|
Landed on I carried over the same core fix and shipped it with:
Closing this PR as already landed direct on |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Auto-allowlist the configured
serverUrlhostname when fetching BlueBubbles attachments, so localhost and private-IP setups work out of the box without requiring explicitallowPrivateNetworkconfig.Problem
After the SSRF security guard was introduced, BlueBubbles attachment downloads from the user's own configured
serverUrl(typicallyhttp://localhost:1234) are silently blocked becauselocalhostis classified as a private/special-use hostname. Users have no obvious workaround since theallowPrivateNetworkconfig field exists but is not discoverable.Closes #27599
Changes
extensions/bluebubbles/src/attachments.ts: WhenallowPrivateNetworkis not explicitly set, extract the hostname from the resolvedserverUrland pass it asallowedHostnamesin the SSRF policy. This is more targeted than blanketallowPrivateNetwork: true— only the specific configured server host is trusted.extensions/bluebubbles/src/attachments.test.ts: Updated existing test and added regression test for private IP serverUrl (192.168.1.5).CHANGELOG.md: Added fix entry.Test plan
allowedHostnames: ["localhost"]is passed whenserverUrlishttp://localhost:1234andallowPrivateNetworkis not set.allowedHostnames: ["192.168.1.5"]for a private IP serverUrl.allowPrivateNetwork: truetest still passes (explicit config takes precedence).pnpm lintandpnpm format:checkclean.Effect on User Experience
Before: Inbound iMessage attachments silently dropped for any BlueBubbles user running the server on localhost or a private IP (the standard setup). Users had to discover and set
allowPrivateNetwork: truemanually.After: Attachment downloads work automatically for the configured
serverUrl. Zero config change needed for users. The explicitallowPrivateNetworkescape hatch still works for edge cases.