Skip to content

tool_getparam: do not print the value of a redacted argument - #22997

Closed
MegaManSec wants to merge 1 commit into
curl:masterfrom
MegaManSec:getparam-redact-clear-arg
Closed

MegaManSec wants to merge 1 commit into
curl:masterfrom
MegaManSec:getparam-redact-clear-arg

Conversation

@MegaManSec

Copy link
Copy Markdown
Contributor

The "starts with a Unicode character" warning printed the full argument,
including for ARG_CLEAR options such as --user, --pass and
--oauth2-bearer. cleanarg() wipes those values from argv to keep them out
of the process list, so writing them to stderr is inconsistent. Print the
option name instead for those; other options are unchanged.

Applies to values from a config file too.

The Unicode warning printed the full argument, including for ARG_CLEAR
options such as --user and --oauth2-bearer whose values cleanarg()
wipes from argv to keep them out of the process list. Print the option
name instead for those.

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable!

@bagder bagder closed this in 67e631a Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants