Changeset 88086db


Ignore:
Timestamp:
2006-06-25T17:23:27Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
6ee9d2d
Parents:
6e1fed7
Message:

Added versioning information to the XML-file (convenient for later format
changes), got rid of confusing "Password successfully changed" message
when the user uses the identify-command and protected rc4_decode() against
short inputs.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r6e1fed7 r88086db  
    3333GSList *irc_connection_list = NULL;
    3434
    35 static char *passchange (irc_t *irc, void *set, char *value)
    36 {
    37         irc_setpass (irc, value);
    38         return (NULL);
     35static char *passchange( irc_t *irc, void *set, char *value )
     36{
     37        irc_setpass( irc, value );
     38        irc_usermsg( irc, "Password successfully changed" );
     39        return NULL;
    3940}
    4041
  • lib/rc4.c

    r6e1fed7 r88086db  
    158158        clear_len = crypt_len - RC4_IV_LEN;
    159159       
     160        if( clear_len < 0 )
     161        {
     162                *clear = g_strdup( "" );
     163                return 0;
     164        }
     165       
    160166        /* Prepare buffers and the key + IV */
    161167        *clear = g_malloc( clear_len + 1 );
  • storage_xml.c

    r6e1fed7 r88086db  
    4040   BitlBee would be a better solution. But this will work for now... */
    4141#define XML_PASS_ERRORMSG "Wrong username or password"
     42#define XML_FORMAT_VERSION 1
    4243
    4344struct xml_parsedata
     
    410411        pass_buf = base64_encode( (char*) pass_md5, 21 );
    411412       
    412         if( !xml_printf( fd, "<user nick=\"%s\" password=\"%s\">\n", irc->nick, pass_buf ) )
     413        if( !xml_printf( fd, "<user nick=\"%s\" password=\"%s\" version=\"%d\">\n", irc->nick, pass_buf, XML_FORMAT_VERSION ) )
    413414                goto write_error;
    414415       
Note: See TracChangeset for help on using the changeset viewer.