-
Notifications
You must be signed in to change notification settings - Fork 962
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
Fix Seg-fault when setting proxy username + password #1181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simue thank you very much for fixing this!
Please also apply the change for those lines here:
https://github.com/libcpr/cpr/blob/master/cpr/session.cpp#L665
I also noticed that this is copy/paste code here so it could be singled out into its own function.
Also the clang tidy warning can be ignored in this case although a better way would be to replace returning a |
I went for returning a const ref to the SecureString, so we don´t do a copy to std::string, leading to the credentials potentially staying in memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done. Thanks for interoperating those changes.
Fix Seg-fault when setting proxy username + password
Providing a char* to underlying data of string_view instead string_view itself to curl api.
Fixes #1180