Gajim shouldn't send an authorization identity in SASL PLAIN
In SASL PLAIN negotiation Gajim currently sends the user's bare JID as the authorization identity. The authorization identity should be empty unless it is actually being used.
Details
SASL PLAIN involves sending the server the following string: base64( authzid + "\0" + authcid + "\0" + password)
The authzid ("authorization identity") is to allow a user to log in as another user, using their own credentials. For example I could use authcid/password "MattJ" and "luarocks", but use authzid "waqas" - in theory if the server supported it and I was a server admin, it would let me log in as waqas.
Psi supports setting an authzid, but Gajim doesn't, and I don't know any servers that supports using it (maybe jabberd14/2?).
I don't know if this feature (being able to configure the authzid) is useful, but either way the current behaviour needs to be fixed first.
Spec
If the initiating entity does not
wish to act on behalf of another entity, it MUST NOT provide an
authorization identity.
http://tools.ietf.org/html/draft-ietf-xmpp-3920bis-05#section-7.2.8
Patch
The attached patch removes the authzid from PLAIN negotiation.