Bug 39790 - Forgets password on nick conflicts when joining MUCs
Summary: Forgets password on nick conflicts when joining MUCs
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/wj...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-08-03 00:44 UTC by Will Thompson
Modified: 2011-09-05 10:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
MUC: don't forget password when handling nick conflicts (7.17 KB, patch)
2011-08-03 00:50 UTC, Will Thompson
Details | Splinter Review
MUC: don't forget password when handling nick conflicts (6.81 KB, patch)
2011-08-03 10:06 UTC, Will Thompson
Details | Splinter Review

Description Will Thompson 2011-08-03 00:44:50 UTC
WockyMuc has a property, :password, representing the current password being used to join the MUC. GabbleMuc previously had a private variable, 'password', which was used for this. In the port to WockyMuc, setting the private variable was removed, but it was still used when re-attempting to join after a nick conflict. Since it was always NULL, this has the effect of making Gabble forget the password you provided if there's a nick conflict.

Patch against 0.12 to follow.
Comment 1 Will Thompson 2011-08-03 00:50:49 UTC
Created attachment 49865 [details] [review]
MUC: don't forget password when handling nick conflicts

WockyMuc has a property, :password, representing the current password
being used to join the MUC. GabbleMuc previously had a private variable,
'password', which was used for this. In the port to WockyMuc, setting
the private variable was removed, but it was still used when
re-attempting to join after a nick conflict.

(I think the password should be a parameter to a hypothetical
wocky_muc_join_async() which does all the nick conflict crap for you.
Having this as state that kicks around on the WockyMuc for ever is
bizarre—once you're in the room, you usually don't use the password,
unless you're the owner, in which case you can retrieve the current
password *which may be different*!)

This patch expunges the zombie private variable, and ensures
WockyMuc:password is only set when the user provides a password, not at
every join attempt.
Comment 2 Will Thompson 2011-08-03 10:06:18 UTC
Created attachment 49885 [details] [review]
MUC: don't forget password when handling nick conflicts

WockyMuc has a property, :password, representing the current password
being used to join the MUC. GabbleMuc previously had a private variable,
'password', which was used for this. In the port to WockyMuc, setting
the private variable was removed, but it was still used when
re-attempting to join after a nick conflict.

(I think the password should be a parameter to a hypothetical
wocky_muc_join_async() which does all the nick conflict crap for you.
Having this as state that kicks around on the WockyMuc for ever is
bizarre—once you're in the room, you usually don't use the password,
unless you're the owner, in which case you can retrieve the current
password *which may be different*!)

This patch expunges the zombie private variable, and ensures
WockyMuc:password is only set when the user provides a password, not at
every join attempt. It adds a test for this case, and some of the basic
functionality of Password (which subsumes some incidental testing of the
Password interface in muc/presence-before-closing: the only test that
touched Password at all!).

Fixes:
Comment 3 Jonny Lamb 2011-08-26 04:08:49 UTC
le ok
Comment 4 Will Thompson 2011-09-05 10:41:00 UTC
Thanks; merged to 0.12 and master for 0.12.7 and 0.13.6.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.