Skip to content
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

NTLM authentication fails when using proxy without username and password #5914

Closed
wants to merge 1 commit into from

Conversation

@ustcqidi
Copy link

ustcqidi commented Sep 5, 2020

try to fix the issue #5911

@bagder
Copy link
Member

bagder commented Sep 5, 2020

Except for the compiler warnings it seems reasonable:

url.c:2385:9: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  char *proxyuser = data->set.str[STRING_PROXYUSERNAME] ? data->set.str[STRING_PROXYUSERNAME] : "";
        ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
url.c:2386:9: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  char *proxypasswd = data->set.str[STRING_PROXYPASSWORD] ? data->set.str[STRING_PROXYPASSWORD] : "";
        ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@bagder bagder changed the title NTLM Authenticate always failed in curl 7.71.1 if Use proxy without username and password NTLM authentication fails when using proxy without username and password Sep 5, 2020
@jay jay added the authentication label Sep 6, 2020
@ustcqidi ustcqidi force-pushed the ustcqidi:master branch from 576c50c to b9bba87 Sep 6, 2020
@ustcqidi
Copy link
Author

ustcqidi commented Sep 6, 2020

Except for the compiler warnings it seems reasonable:

url.c:2385:9: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  char *proxyuser = data->set.str[STRING_PROXYUSERNAME] ? data->set.str[STRING_PROXYUSERNAME] : "";
        ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
url.c:2386:9: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  char *proxypasswd = data->set.str[STRING_PROXYPASSWORD] ? data->set.str[STRING_PROXYPASSWORD] : "";
        ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@bagder thanks for your review, I have updated the patch. Could you please help to review it again? Many thanks.

@bagder
Copy link
Member

bagder commented Sep 7, 2020

The CI builds still complain (run make checksrc to detect these yourself):

./url.c:2385:106: warning: Longer than 79 columns (LONGLINE)
   const char *proxyuser = data->set.str[STRING_PROXYUSERNAME] ? data->set.str[STRING_PROXYUSERNAME] : "";
./url.c:2386:108: warning: Longer than 79 columns (LONGLINE)
   const char *proxypasswd = data->set.str[STRING_PROXYPASSWORD] ? data->set.str[STRING_PROXYPASSWORD] : "";
checksrc: 0 errors and 2 warnings
@ustcqidi ustcqidi force-pushed the ustcqidi:master branch from b9bba87 to 4645f5e Sep 7, 2020
@ustcqidi
Copy link
Author

ustcqidi commented Sep 7, 2020

Have fixed the warning and verified with checksrc.bat. thanks @bagder

@ustcqidi ustcqidi force-pushed the ustcqidi:master branch from 4645f5e to e655c71 Sep 7, 2020
@deepcode-ci-bot
Copy link

deepcode-ci-bot bot commented Sep 7, 2020

DeepCode failed to analyze this pull request

Something went wrong despite trying multiple times, sorry about that.
Please comment this pull request with "Retry DeepCode" to manually retry, or contact us so that a human can look into the issue.

1 similar comment
@deepcode-ci-bot
Copy link

deepcode-ci-bot bot commented Sep 7, 2020

DeepCode failed to analyze this pull request

Something went wrong despite trying multiple times, sorry about that.
Please comment this pull request with "Retry DeepCode" to manually retry, or contact us so that a human can look into the issue.

@bagder
Copy link
Member

bagder commented Sep 7, 2020

Thanks!

@bagder bagder closed this in 3532262 Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.