Skip to content

Fix S2S dialback not offered in post-TLS features when self-signed certs accepted#3291

Open
milne1282 wants to merge 1 commit intoigniterealtime:mainfrom
milne1282:fix/s2s-selfsigned-dialback-property
Open

Fix S2S dialback not offered in post-TLS features when self-signed certs accepted#3291
milne1282 wants to merge 1 commit intoigniterealtime:mainfrom
milne1282:fix/s2s-selfsigned-dialback-property

Conversation

@milne1282
Copy link
Copy Markdown

ServerDialback.isEnabledForSelfSigned() reads the legacy property xmpp.server.certificate.accept-selfsigned (TLS_ACCEPT_SELFSIGNED_CERTS), but ConnectionListener.setAcceptSelfSignedCertificates() — which backs the Admin Console UI checkbox — writes to the per-connection-type prefixed property xmpp.socket.ssl.certificate.accept-selfsigned. These diverged when per-type prefixed properties were introduced but the readers in ServerDialback were not updated.

The consequence is that after a successful TLS handshake with a self-signed peer certificate, LocalIncomingServerSession.getAvailableStreamFeatures() calls isEnabledForSelfSigned(), gets false, and omits db:dialback from the post-TLS stream:features. The connecting server then finds no usable authentication mechanism and closes the connection. This causes all encrypted S2S connections to fail silently when the only option is dialback, even if the operator has enabled self-signed certificate acceptance via the UI.

Fix: check both property names in isEnabledForSelfSigned(), preserving full backwards compatibility with installations that have the legacy property set.

…rts accepted

ServerDialback.isEnabledForSelfSigned() reads the legacy property
xmpp.server.certificate.accept-selfsigned (TLS_ACCEPT_SELFSIGNED_CERTS),
but ConnectionListener.setAcceptSelfSignedCertificates() — which backs the
Admin Console UI checkbox — writes to the per-connection-type prefixed
property xmpp.socket.ssl.certificate.accept-selfsigned. These diverged when
per-type prefixed properties were introduced but the readers in ServerDialback
were not updated.

The consequence is that after a successful TLS handshake with a self-signed
peer certificate, LocalIncomingServerSession.getAvailableStreamFeatures() calls
isEnabledForSelfSigned(), gets false, and omits <db:dialback> from the post-TLS
<stream:features>. The connecting server then finds no usable authentication
mechanism and closes the connection. This causes all encrypted S2S connections
to fail silently when the only option is dialback, even if the operator has
enabled self-signed certificate acceptance via the UI.

Fix: check both property names in isEnabledForSelfSigned(), preserving full
backwards compatibility with installations that have the legacy property set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@guusdk
Copy link
Copy Markdown
Member

guusdk commented Apr 25, 2026

Oh, interesting. Thanks for this @milne1282 ! Did you happen to check if other connection types suffer from a similar issue, triggered by the same type of divergence after the prefixed properties were introduced?

@milne1282
Copy link
Copy Markdown
Author

milne1282 commented Apr 25, 2026

Hey @guusdk I have not checked other properties as I was focused on an implementation topology that this affected and have not made a more general search

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants