]> git.ipfire.org Git - thirdparty/openvpn.git/commit
options: don't leak inline'd key material in logfile
authorAntonio Quartulli <a@unstable.cc>
Fri, 17 Jul 2020 21:28:20 +0000 (23:28 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 18 Jul 2020 07:40:16 +0000 (09:40 +0200)
commit19fab1f6cf71715f84d09d6a8b49698b0ae42cd1
treee41ef5b836ca2d86ef3a00fd6d18c213ce21de6c
parent83d6da5097f79c698500f638ee3c54309b982e03
options: don't leak inline'd key material in logfile

With the conversion of the introduction of a bool variable to signal
when a certain string is a filename or the actual (inline'd) key
material, the SHOW_STR() macro is now leaking the inline'd material to
the log file.

This happens because SHOW_STR will just print the content of the passed
argument without any check. With the new logic this should not happen
anymore.

A new macro SHOW_STR_INLINE() is therefore introduced which will check
the appropriate bool member before deciding to print the actual string
content or not.

Trac: #1304
Reported-by: Richard Bonhomme <tincanteksup@gmail.com>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200717212820.8998-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20472.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c