Changeset 6ee51a9


Ignore:
Timestamp:
2012-08-19T14:07:48Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
68709f5
Parents:
d3bfe3d
Message:

Allow "set -del password". #984

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/account.c

    rd3bfe3d r6ee51a9  
    154154        else if( strcmp( set->key, "password" ) == 0 )
    155155        {
    156                 if( value )
    157                 {
    158                         g_free( acc->pass );
    159                         acc->pass = g_strdup( value );
    160                         return NULL;    /* password shouldn't be visible in plaintext! */
    161                 }
    162                 else
    163                 {
    164                         /* NULL can (should) be stored in the set_t
    165                            variable, but is otherwise not correct. */
    166                         return SET_INVALID;
    167                 }
     156                /* set -del should be allowed now, but I don't want to have any
     157                   NULL pointers to have to deal with. */
     158                if( !value )
     159                        value = "";
     160               
     161                g_free( acc->pass );
     162                acc->pass = g_strdup( value );
     163                return NULL;    /* password shouldn't be visible in plaintext! */
    168164        }
    169165        else if( strcmp( set->key, "tag" ) == 0 )
Note: See TracChangeset for help on using the changeset viewer.