diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-02-17 11:26:44 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-02-17 11:26:44 +0000 |
commit | 9186d15356a46576fb5b306f49a6acdb64fb7622 (patch) | |
tree | ba8040110d4bdfe3c38abc4005c24f25a8dbc90b /protocols/msn/passport.c | |
parent | e6648bf3b821ae40c0640857aae069bc0f5d90c4 (diff) |
Automatically truncate MSN passports to 16 characters because that's the
maximum supported by MSN and giving a longer password will make the
authentication fail.
Diffstat (limited to 'protocols/msn/passport.c')
-rw-r--r-- | protocols/msn/passport.c | 5 |
1 files changed, 5 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 ); } |