This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Fix encoding of Digest authentication headers #36627
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wfurt
approved these changes
Apr 5, 2019
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.
LGTM
mconnew
reviewed
Apr 5, 2019
src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs
Outdated
Show resolved
Hide resolved
mconnew
approved these changes
Apr 5, 2019
karelz
reviewed
Apr 5, 2019
src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs
Outdated
Show resolved
Hide resolved
Performance is better. And more comments if necessary to make it readable.
|
stephentoub
reviewed
Apr 6, 2019
src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs
Outdated
Show resolved
Hide resolved
stephentoub
reviewed
Apr 6, 2019
src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs
Outdated
Show resolved
Hide resolved
stephentoub
reviewed
Apr 6, 2019
src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs
Outdated
Show resolved
Hide resolved
I believe I have addressed all the feedback. Can I get another round of review? Thanks! |
/azp run |
Azure Pipelines successfully started running 4 pipeline(s). |
davidsh
approved these changes
Apr 13, 2019
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.
LGTM. Thanks for the PR!
filipnavara
added a commit
to filipnavara/corefx
that referenced
this pull request
Apr 18, 2020
* Fix encoding of Digest authentication headers for servers that don't understand RFC 5987 encoding * Quote-prefix special characters when encoding Digest headers * Address PR feedback
baulig
pushed a commit
to mono/corefx
that referenced
this pull request
Apr 23, 2020
* Fix encoding of Digest authentication headers for servers that don't understand RFC 5987 encoding * Quote-prefix special characters when encoding Digest headers * Address PR feedback
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
* Fix encoding of Digest authentication headers for servers that don't understand RFC 5987 encoding * Quote-prefix special characters when encoding Digest headers * Address PR feedback Commit migrated from dotnet/corefx@cce7870
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix encoding of Digest authentication headers for servers that don't understand RFC 5987 encoding. The original HTTP Digest specification (RFC 2617) predates RFC 5987 by 11 years. For user names that don't require RFC 5987 use the old encoding that is compatible with the original specification. This affects mainly user names that contain the '@' character.
The actual fix is removing this line:
https://github.com/filipnavara/corefx/blob/bbfc1d7e52b96ea617c6b9c37cad363449fbe1ae/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs#L103
Rest is renaming method names for clarity, adding
static
modifier and reusing the same code fromContentDispositionHeaderValue
.Fixes #36622