Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12715 closed patch (fixed)

Patch: API for adding Auth mechs to Jabber prpl

Reported by: BigBrownChunx Owned by: deryni
Milestone: 2.7.6 Component: XMPP
Version: 2.7.3 Keywords: jabber auth api


3rd party prpls can't add auth mechs to the jabber prpl without modifying jabber/auth.c. This patch opens it up with an add and remove function

Attachments (1)

jabberauth.diff (1.6 KB) - added by BigBrownChunx 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by Robby

  • Milestone set to Patches Needing Review

comment:2 Changed 9 years ago by datallah

  • Milestone changed from Patches Needing Review to 2.8.0

The patch has a typo - the "plain" mech is always being added in jabber_auth_add_mech() instead of the specified mech.

The only other questionable thing is that the mechs are global - a 3rd party prpl adding a new mech would affect all XMPP accounts too.

Changed 9 years ago by BigBrownChunx

comment:3 Changed 9 years ago by BigBrownChunx

Updated the patch to fix the typo. Oops :)

Opening up plugins to add new auth mechs globally is on purpose so that eg someone could write a plugin to support X-GOOGLE-TOKEN without having to modify the original 'Gtalk' prpl.

comment:4 Changed 9 years ago by datallah

Hmm... is this really something that a plugin could (reasonably) do? This isn't really "public API" - do we even install jabber.h?

comment:5 Changed 9 years ago by BigBrownChunx

No, jabber.h isn't shipped, but this makes it one step easier to make 3rd-party xmpp-based protocols, even if it has to compile against the non-public jabber headers. Otherwise a whole new libjabber.[dll|so] has to be built.

comment:6 Changed 9 years ago by darkrain42

As I've mentioned, libjabber is not at all guaranteed to be A{BP}I-stable. I'm not comfortable guaranteeing that there will be no changes to the JabberSaslMech structure in order to add support for leveraging both Cyrus and built-in mechanisms simultaneously (allowing Windows/distro users to use SCRAM, interop DIGEST-MD5 more effectively, etc)

Other than that, this is a mostly sane patch (Why aren't you just using g_slist_remove?) which I'm fine with committing

Edit (11/01): Fixed up my grammar per Stu returning ENOPARSE

comment:7 Changed 9 years ago by eion@…

  • Milestone changed from 2.8.0 to 2.7.6
  • Resolution set to fixed
  • Status changed from new to closed

(In f01c542dc4811778ea9ae719b9b621eff9c6350b):
jabber: Add abstraction functions for adding/removing auth mechs. Closes #12715

Slight modification from me to g_slist_remove. If it breaks, blame him.

comment:8 Changed 9 years ago by darkrain42

Fixed grammar on earlier comment (per Stu) :)

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!