Changeset 9c3343


Ignore:
Timestamp:
11/25/10 18:48:50 (18 months ago)
Author:
Håkan Kvist <hagar@…>
Branches:
master
Children:
d4849a
Parents:
0a968a
git-author:
Håkan Kvist <hagar@…> (11/25/10 18:48:50)
git-committer:
Erik Ekman <erik@…> (02/04/12 20:34:05)
Message:

Allow spaces in passwords, #93

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r0a968a r9c3343  
    3232        - Open log before chroot, fixes #86: logging on FreeBSD. 
    3333        - Fix DNS tunneling bug caused by uninitialized variable, #94 
     34        - Handle spaces when entering password interactively, fixes #93. 
     35                Patch by Hagar. 
    3436 
    35372009-06-01: 0.5.2 "WifiFree" 
  • src/common.c

    r05e99c r9c3343  
    220220read_password(char *buf, size_t len) 
    221221{ 
    222         char pwd[80]; 
     222        char pwd[80] = {0}; 
    223223#ifndef WINDOWS32 
    224224        struct termios old; 
     
    237237        fflush(stderr); 
    238238#ifndef WINDOWS32 
    239         scanf("%79s", pwd); 
     239        fscanf(stdin, "%79[^\n]", pwd); 
    240240#else 
    241241        for (i = 0; i < sizeof(pwd); i++) { 
Note: See TracChangeset for help on using the changeset viewer.