Changeset 7815a2b for protocols


Ignore:
Timestamp:
2010-04-07T02:15:44Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
33b306e
Parents:
e3413cc
Message:

Check MSN display names given by the server for UTF-8-correctness before
using them since invalid XML ending up in user configs can get very ugly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/ns.c

    re3413cc r7815a2b  
    768768                                      "to use the local name.", s->value, name );
    769769               
    770                 g_free( s->value );
    771                 s->value = g_strdup( name );
     770                if( g_utf8_validate( name, -1, NULL ) )
     771                {
     772                        g_free( s->value );
     773                        s->value = g_strdup( name );
     774                }
     775                else
     776                {
     777                        imcb_log( ic, "Warning: Friendly name in server response was corrupted" );
     778                }
     779               
    772780                return TRUE;
    773781        }
Note: See TracChangeset for help on using the changeset viewer.