Modify

#893 closed defect (fixed)

Multiple twitter accounts causes 'Authentication failure'

Reported by: DjSlash Owned by:
Priority: normal Milestone:
Component: BitlBee Version: devel
Keywords: twitter Cc:
IRC client+version: Client-independent Operating System: Linux
OS version/distro:

Description

I have three twitter accounts enabled in bitlbee, but since two days or so, bitlbee seems to be having problems authenticating them seperatly. So I got a bit testing going on and I can not pinpoint the exact trigger yet. Sometimes it looks like if it's working fine, but then it disconnects again. Since it *can* connect fine when enabling the account, there is obviously nothing wrong with the authentication process (nor with my account credentials).

This is on a debian testing (wheezy) system with http://code.bitlbee.org/debian/devel/testing/amd64/ as apt-source. Affected/tested versions: bitlbee-3.0.4+devel+849-1 & bitlbee-3.0.4+z+20120104+devel+870-2

Attachments (0)

Change History (5)

comment:1 Changed at 2012-01-10T17:23:19Z by wilmer

This is Twitter fucking up. They sometimes reject BitlBee's authentication info and BitlBee treats that as a fatal error. Which is IMHO a reasonable thing to do but not when the service is being unreasonable.

comment:2 Changed at 2012-01-10T19:45:24Z by sean@…

I've seen something similar - getting bumped off Twitter with a 401 Unauthorized.

Debug log of HTTP traffic: https://gist.github.com/1590748

comment:3 Changed at 2012-01-10T23:50:57Z by wilmer

Patch for people who like those:

=== modified file 'protocols/twitter/twitter_lib.c'
--- protocols/twitter/twitter_lib.c	2011-12-26 18:17:51 +0000
+++ protocols/twitter/twitter_lib.c	2012-01-10 23:36:29 +0000
@@ -886,10 +886,6 @@
 		td->http_fails = 0;
 		if (!(ic->flags & OPT_LOGGED_IN))
 			imcb_connected(ic);
-	} else if (req->status_code == 401) {
-		imcb_error(ic, "Authentication failure");
-		imc_logout(ic, FALSE);
-		goto end;
 	} else {
 		// It didn't go well, output the error and return.
 		if (++td->http_fails >= 5)
@@ -938,10 +934,6 @@
 		td->http_fails = 0;
 		if (!(ic->flags & OPT_LOGGED_IN))
 			imcb_connected(ic);
-	} else if (req->status_code == 401) {
-		imcb_error(ic, "Authentication failure");
-		imc_logout(ic, FALSE);
-		goto end;
 	} else {
 		// It didn't go well, output the error and return.
 		if (++td->http_fails >= 5)

comment:4 Changed at 2012-01-11T01:59:26Z by sean@…

Thanks - I'll run it and report back. It's strange though that one request will fail with a 401, and another in the debug log will get a 200. Could it be a threading issue?

comment:5 Changed at 2012-01-12T10:40:32Z by wilmer

Resolution: fixed
Status: newclosed

Oh yes, so this was fixed in a commit two days ago..

Modify Ticket

Action
as closed The ticket will remain with no owner.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.