-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The command line arguments '-u user:password' are not hidden #9128
Labels
Comments
bagder
added a commit
that referenced
this issue
Aug 30, 2022
bagder
added a commit
that referenced
this issue
Aug 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #9127
Originally posted by LitterWhite July 9, 2022
I seem to have found a bug.
When starting curl, I pass username and password via command line, like this:
Then check the cmdline of curl by ps and expect user name and password are hidden,like this:
But they are not.
I check the code and found the arg of 'user:password' will be clean at getparameter()
src/tool_getparam.c: getparameter()
src/tool_paramhlp.c: cleanarg()
However, the pointer 'nextarg' pass to cleanarg is not the argv[] from main(argc, argv), it is copyed from argv[] at parse_args()
src/tool_getparam.c: parse_args()
lib/curl_multibyte.h
Thus, the user name and password in argv are not cleaned up.
The last version is this:
src/tool_getparam.c: parse_args()
it was changed at commit 9e5669f
Maybe my understanding of the code is wrong, looking forward to a reply
The text was updated successfully, but these errors were encountered: