]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_getparam: clear sensitive arguments better
authorDaniel Stenberg <daniel@haxx.se>
Wed, 19 Feb 2025 22:55:31 +0000 (23:55 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 20 Feb 2025 08:56:09 +0000 (09:56 +0100)
commit654f8cb5f353905c6eb5b2a6ef7e5beafa7d0634
tree0458559b6ebbcdbf13cd8279c0360b0cb989bc9f
parentc64304e111d1d6827355487d0b1061d899573e38
tool_getparam: clear sensitive arguments better

curl attempts to clear some flags to hide them from snooping neighbors
(on platforms where it works). For example the credentials provided with
-u. Previously it would only do that if there was a space between the
option and the credentials as in "-u joe:s3cr3t" but not when done
without a separating space as in "-ujoe:s3cr3t".

This addresses that previous shortcoming.

Reported-by: kayrus on github
Fixes #16396
Closes #16401
src/tool_getparam.c
src/tool_getparam.h
src/tool_parsecfg.c