Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken compatibility with purple-facebook #6

Open
marsjaninzmarsa opened this issue Aug 24, 2015 · 7 comments
Open

Broken compatibility with purple-facebook #6

marsjaninzmarsa opened this issue Aug 24, 2015 · 7 comments

Comments

@marsjaninzmarsa
Copy link

And probably other protocols too.

All collected info: dequis/purple-facebook#48

@aebrahim
Copy link
Owner

Does unchecking the clear memory option fix the problem?

@dequis
Copy link

dequis commented Aug 25, 2015

It was off when i tested it, memory_clearing_function() was never reached. I believe it's more about the purple_account_set_password() calls.

@marsjaninzmarsa
Copy link
Author

@aebrahim nope. 😞

@marsjaninzmarsa
Copy link
Author

Hmm, actually, surprising... yes, that helped. Don't know why that wasn't working before, but after reboot it's working.

But it's workaround not solution, I think.

@aebrahim
Copy link
Owner

aebrahim commented Jan 9, 2016

i disagree that this is a "workaround not a solution"

The memory clearing option removes the passwords from pidgin, which would prevent any other plugin from being able to access them. It's a measure for extra security, which some people want and some won't. Because it might break compatibility for some protocols/features. It's off by default.

However, there is still a problem if the plugin doesn't work with this option unchecked. @dequis are you still unable to get this working with this option unchecked?

@dequis
Copy link

dequis commented Jan 9, 2016

I haven't tested again but indeed the problem is that it breaks when the option is unchecked. I'm not sure what the "workaround" is supposed to be.

I'll report back in a while with fresher testing results, to see if anything changed on the other side.

Quoting my main messages from the other ticket, for completeness:

Okay, i've done some debugging.

libpurple/account.c:1318-1324, in purple_account_connect()

  password = purple_account_get_password(account);
  if ((password == NULL) &&
      !(prpl_info->options & OPT_PROTO_NO_PASSWORD) &&
      !(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL))
      purple_account_request_password(account, G_CALLBACK(request_password_ok_cb), G_CALLBACK(request_password_cancel_cb), account);
  else
      _purple_connection_new(account, FALSE, password);

purple_account_request_password is the function that shows the password prompt, if any of those three conditions pass

password == NULL always fails because the keyring plugin wipes passwords intentionally, and this plugin doesn't have OPT_PROTO_NO_PASSWORD and OPT_PROTO_PASSWORD_OPTIONAL

The only plugins with optional/no password flags are XMPP, IRC, SILC, bonjour and zephyr. Those will work fine with your keyring plugin. The rest won't. It seems you only tested with XMPP, aside from purple-facebook.

So, not our bug. Submit an issue to pidgin-gnome-keyring, and link them this comment. Good luck!

And:

I meant the password of the in-memory PurpleAccount structure. But yeah, my assumption that this password always gets wiped may be incorrect (and i don't even have the clear_memory setting enabled). I wasn't really aiming to debug the keyring plugin, which is clearly full of (unfortunately necessary) hacks.

But what I'm 100% sure about is that this affects every other plugin out there, and it's not our fault.

@aebrahim
Copy link
Owner

aebrahim commented Jan 10, 2016 via email

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

No branches or pull requests

3 participants