changeset 19247:44b9e41bde2a

No longer check the length of passwords - instead, pass the password to the servers, which will give a login failed message anyway. This avoids having a new popup just for over-long passwords, until libpurple supports per-protocol password length limits.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Wed, 15 Aug 2007 15:41:33 +0000
parents 335ebd202a7d
children d34e49d8fac7
files libpurple/protocols/myspace/myspace.c libpurple/protocols/myspace/myspace.h
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Wed Aug 15 06:26:48 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Wed Aug 15 15:41:33 2007 +0000
@@ -612,6 +612,7 @@
 	gc->proto_data = msim_session_new(acct);
 	gc->flags |= PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_NO_URLDESC;
 
+#ifdef MSIM_MAX_PASSWORD_LENGTH
 	/* Passwords are limited in length. */
 	if (strlen(acct->password) > MSIM_MAX_PASSWORD_LENGTH) {
 		gchar *str;
@@ -629,6 +630,7 @@
 		
 		g_free(str);
 	}
+#endif
 
 	/* 1. connect to server */
 	purple_connection_update_progress(gc, _("Connecting"),
--- a/libpurple/protocols/myspace/myspace.h	Wed Aug 15 06:26:48 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.h	Wed Aug 15 15:41:33 2007 +0000
@@ -77,7 +77,10 @@
  * on the official client (build 679) and on the 'new password' field at
  * http://settings.myspace.com/index.cfm?fuseaction=user.changepassword
  * (though curiously, not on the 'current password' field). */
-#define MSIM_MAX_PASSWORD_LENGTH    10
+
+/* Not defined; instead have the client reject the password, until libpurple
+ * supports specifying a length limit on the protocol's password. */
+/* #define MSIM_MAX_PASSWORD_LENGTH    10	*/
 
 /* Build version of MySpaceIM to report to servers (1.0.xxx.0) */
 #define MSIM_CLIENT_VERSION         697