mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-24 06:38:08 +00:00
Don't put lines starting with a space character in the history, to allow hiding password from history file.
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@274 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
1c0efc71c6
commit
4f92fae1a1
1 changed files with 4 additions and 2 deletions
|
|
@ -946,9 +946,11 @@ linphonec_main_loop (LinphoneCore * opm, char * sipAddr)
|
|||
#ifdef HAVE_READLINE
|
||||
/*
|
||||
* Only add to history if not already
|
||||
* last item in it
|
||||
* last item in it, and only if the command
|
||||
* doesn't start with a space (to allow for
|
||||
* hiding passwords)
|
||||
*/
|
||||
if ( strcmp(last_in_history, iptr) )
|
||||
if ( iptr == input && strcmp(last_in_history, iptr) )
|
||||
{
|
||||
strncpy(last_in_history,iptr,sizeof(last_in_history));
|
||||
last_in_history[sizeof(last_in_history)-1]='\0';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue