diff options
-rw-r--r-- | protocols/msn/passport.c | 5 | ||||
-rw-r--r-- | protocols/msn/passport.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/protocols/msn/passport.c b/protocols/msn/passport.c index 7a15c3fe..565d15f3 100644 --- a/protocols/msn/passport.c +++ b/protocols/msn/passport.c @@ -52,6 +52,11 @@ int passport_get_token( gpointer func, gpointer data, char *username, char *pass if( mad->cookie[i] == ',' ) mad->cookie[i] = '&'; + /* Microsoft doesn't allow password longer than 16 chars and silently + fails authentication if you give the "full version" of your passwd. */ + if( strlen( mad->password ) > MAX_PASSPORT_PWLEN ) + mad->password[MAX_PASSPORT_PWLEN] = 0; + return passport_get_token_real( mad ); } diff --git a/protocols/msn/passport.h b/protocols/msn/passport.h index 1d0c6edc..517d2e91 100644 --- a/protocols/msn/passport.h +++ b/protocols/msn/passport.h @@ -35,6 +35,8 @@ #endif #include "nogaim.h" +#define MAX_PASSPORT_PWLEN 16 + struct msn_auth_data { char *url; |