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

Credential fixes #61114

Merged
merged 3 commits into from
Nov 3, 2021
Merged

Credential fixes #61114

merged 3 commits into from
Nov 3, 2021

Conversation

aik-jahoda
Copy link
Contributor

No description provided.

@ghost
Copy link

ghost commented Nov 2, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: aik-jahoda
Assignees: -
Labels:

area-System.Net

Milestone: -

Copy link
Member

@wfurt wfurt left a comment

Choose a reason for hiding this comment

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

LGTM.
Seems like we are hiding the password from the scanner .... but I think it is ok for the tests.

@stephentoub stephentoub merged commit 65c9433 into dotnet:main Nov 3, 2021
@karelz karelz added this to the 7.0.0 milestone Nov 4, 2021
@aik-jahoda aik-jahoda deleted the jajahoda/credscanNew branch November 9, 2021 13:10
aik-jahoda pushed a commit to aik-jahoda/runtime that referenced this pull request Nov 9, 2021
aik-jahoda pushed a commit to aik-jahoda/runtime that referenced this pull request Nov 9, 2021
* fix HttpClientHandlerTest.RemoteServer.cs

* fix HttpClientHandlerTest.Authentication.cs

* fix HttpClientHandlerTest.cs
@@ -421,7 +421,7 @@ public async Task PostAsync_ManyDifferentRequestHeaders_SentCorrectly()
request.Headers.Add("Access-Control-Request-Method", "GET");
request.Headers.Add("Access-Control-Request-Headers", "GET");
request.Headers.Add("Age", "12");
request.Headers.Authorization = new AuthenticationHeaderValue("Basic", "QWxhZGRpbjpvcGVuIHNlc2FtZQ==");
request.Headers.Authorization = new AuthenticationHeaderValue("Basic", authSafeValue);
Copy link
Member

Choose a reason for hiding this comment

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

just curious, how did extracting this into a variable help credscan?

@@ -203,7 +203,7 @@ public static IEnumerable<object[]> Authentication_TestData()
{
yield return new object[] { "Basic realm=\"testrealm\"", true };
yield return new object[] { "Basic ", true };
yield return new object[] { "Basic realm=withoutquotes", true };
yield return new object[] { "Basic realm=PLACEHOLDERwithoutquotes", true };
Copy link
Member

Choose a reason for hiding this comment

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

credscan picked up on the "realm" part here? but not on line 204? It is strange...

Anipik pushed a commit that referenced this pull request Nov 9, 2021
* fix HttpClientHandlerTest.RemoteServer.cs

* fix HttpClientHandlerTest.Authentication.cs

* fix HttpClientHandlerTest.cs
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants