Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Fix encoding of Digest authentication headers #36627

Merged
merged 3 commits into from
Apr 13, 2019

Conversation

filipnavara
Copy link
Member

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 from ContentDispositionHeaderValue.

Fixes #36622

@filipnavara filipnavara marked this pull request as ready for review April 5, 2019 13:35
@davidsh davidsh requested review from stephentoub, a team and mconnew April 5, 2019 14:39
@davidsh davidsh added this to the 3.0 milestone Apr 5, 2019
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

@davidsh
Copy link
Contributor

davidsh commented Apr 6, 2019 via email

@filipnavara
Copy link
Member Author

I believe I have addressed all the feedback. Can I get another round of review? Thanks!

@davidsh
Copy link
Contributor

davidsh commented Apr 12, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

Copy link
Contributor

@davidsh davidsh left a 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!

@davidsh davidsh merged commit cce7870 into dotnet:master Apr 13, 2019
@filipnavara filipnavara deleted the digest-encoding branch April 13, 2019 16:08
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Digest authentication does not respect RFC7616-3.4
7 participants