adium 4017:e071ecbbe9bb: Don't use client login for OSCAR accoun...

commits at adium.im commits at adium.im
Sat Jun 25 20:34:57 UTC 2011


details:	http://hg.adium.im/adium/rev/e071ecbbe9bb
revision:	4017:e071ecbbe9bb
branch:		(none)
author:		Evan Schoenberg
date:		Sat Jun 25 15:34:53 2011 -0500

Don't use client login for OSCAR accounts if a proxy is configured. Worksaround #15137. Fixes #15137.

diffs (43 lines):

diff -r 21892f51a562 -r e071ecbbe9bb Plugins/Purple Service/CBPurpleAccount.h
--- a/Plugins/Purple Service/CBPurpleAccount.h	Sat Jun 25 15:26:44 2011 -0500
+++ b/Plugins/Purple Service/CBPurpleAccount.h	Sat Jun 25 15:34:53 2011 -0500
@@ -226,4 +226,5 @@
 
 @interface CBPurpleAccount (ForSubclasses)
 - (void)continueConnectWithConfiguredPurpleAccount;
+- (void)continueConnectWithConfiguredProxy;
 @end
diff -r 21892f51a562 -r e071ecbbe9bb Plugins/Purple Service/CBPurpleOscarAccount.m
--- a/Plugins/Purple Service/CBPurpleOscarAccount.m	Sat Jun 25 15:26:44 2011 -0500
+++ b/Plugins/Purple Service/CBPurpleOscarAccount.m	Sat Jun 25 15:34:53 2011 -0500
@@ -98,7 +98,7 @@
 	purple_account_set_bool(account, "allow_multiple_logins", [[self preferenceForKey:PREFERENCE_ALLOW_MULTIPLE_LOGINS
 																				group:GROUP_ACCOUNT_STATUS] boolValue]);
 	
-	// Always yes, so SSL on ICQ works again.
+	//Always yes, so SSL on ICQ works again. Note that we'll disable it if we're using a proxy server.
 	purple_account_set_bool(account, "use_clientlogin", TRUE);
 	
 	if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_OPPORTUNISTIC]) {
@@ -110,6 +110,21 @@
 	}
 }
 
+- (void)continueConnectWithConfiguredProxy
+{
+	PurpleProxyInfo *proxy_info = purple_account_get_proxy_info(account);
+ 
+    if ((purple_proxy_info_get_type(proxy_info) != PURPLE_PROXY_NONE) && 
+        purple_proxy_info_get_host(proxy_info) && strlen(purple_proxy_info_get_host(proxy_info))) {
+        /* Proxy servers and client login don't currently get along.  This should be fixed in libpurple, but until then,
+         * just don't use it.
+         */
+        purple_account_set_bool(account, "use_clientlogin", FALSE);
+    }
+        
+    [super continueConnectWithConfiguredProxy];
+}
+    
 - (void)migrateSSL
 {
 	// ICQ and AIM should override this




More information about the commits mailing list