Skip to content

Conversation

@Human
Copy link
Contributor

@Human Human commented Aug 20, 2025

Proposed change

Fixes a regression in the XMPP integration for non-TLS XMPP servers.

Type of change

  • Bugfix (non-breaking change which fixes an issue)

Additional information

I do not have a TLS-enabled XMPP server to test, and I would appreciate someone with a TLS-enabled XMPP server to ensure that my change does not fix the issue for non-TLS-enabled servers at the expense of breaking TLS-enabled servers.

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • I have followed the [perfect PR recommendations][perfect-pr]
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

To help with the load of incoming pull requests:

@home-assistant
Copy link

Hey there @fabaff, @flowolf, mind taking a look at this pull request as it has been labeled with an integration (xmpp) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of xmpp can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign xmpp Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@TheJulianJES TheJulianJES changed the title the integration again works with non-TLS XMPP servers Fix XMPP not working with non-TLS servers Aug 21, 2025
frenck
frenck previously requested changes Sep 1, 2025
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh hi there @Human 👋

Thanks for opening a pull request. However, we cannot merge or process untested PRs.

Please make sure to properly test is or add unit tests.

Thanks! 👍

../Frenck

@home-assistant home-assistant bot marked this pull request as draft September 1, 2025 08:41
@home-assistant
Copy link

home-assistant bot commented Sep 1, 2025

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@Human
Copy link
Contributor Author

Human commented Sep 1, 2025

Hi, @frenck ! I did manually test that before my two-line change, unencrypted XMPP servers no longer work, and after my two-line change, they work again. Is there other specific testing that you would like to see? Perhaps I could temporarily configure an encrypted XMPP server to ensure that encrypted connections do not regress with this change? That would still be a manual test, of course.

@Human
Copy link
Contributor Author

Human commented Sep 2, 2025

I was able to manually test this as follows:

I kept my legacy non-TLS XMPP config, which works with my PR:

  - name: low_priority
    platform: xmpp
    sender: low@xmpp
    password: !secret jabber_password
    recipient: igo@xmpp
    tls: False

I set up an account on a public encrypted XMPP server and added two configurations for it:

  - name: jabberx_no_enc
    platform: xmpp
    sender: bob@jabberx.net
    password: !secret jabberx_password
    recipient: bob@jabberx.net
    tls: False

and

  - name: jabberx_enc
    platform: xmpp
    sender: bob@jabberx.net
    password: !secret jabberx_password
    recipient: bob@jabberx.net
    tls: True

My expectation of a successful test would be that the mis-configured jabberx_no_enc would not allow sending messages, but the properly-configured jabberx_enc would. Indeed this is what happens when I try to use each of those.

I hope this manual test suffices.

@Human Human marked this pull request as ready for review September 2, 2025 12:40
@home-assistant home-assistant bot requested a review from frenck September 2, 2025 12:40
@joostlek joostlek added this to the 2025.9.2 milestone Sep 9, 2025
@joostlek joostlek dismissed frenck’s stale review September 9, 2025 13:18

Manual tests looks okay

@joostlek joostlek merged commit 1117b92 into home-assistant:dev Sep 9, 2025
30 checks passed
@Human Human deleted the xmpp_non_tls_regression_fix branch September 9, 2025 19:03
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xmpp: regression in support for non-TLS XMPP servers

4 participants