diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-07-22 08:06:30 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-07-22 08:06:30 -0700 |
commit | 3ccd0209c90c9165c968213eb5770c7f004ef968 (patch) | |
tree | d6a3d4eb32fccffccfe5949c707133ba3cbfe112 | |
parent | b6070b949ba04047b348040f150c7a1ea22f9276 (diff) | |
download | DotNetOpenAuth-3ccd0209c90c9165c968213eb5770c7f004ef968.zip DotNetOpenAuth-3ccd0209c90c9165c968213eb5770c7f004ef968.tar.gz DotNetOpenAuth-3ccd0209c90c9165c968213eb5770c7f004ef968.tar.bz2 |
Fix NetworkCredentialApplicator verify check
Fixes #183
-rw-r--r-- | src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs index 415c893..7c17009 100644 --- a/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs +++ b/src/DotNetOpenAuth.OAuth2.Client/OAuth2/ClientCredentialApplicator.cs @@ -127,8 +127,12 @@ namespace DotNetOpenAuth.OAuth2 { /// <param name="request">The outbound message to apply authentication information to.</param> public override void ApplyClientCredential(string clientIdentifier, HttpWebRequest request) { if (clientIdentifier != null) { - if (this.credential != null && this.credential.UserName == clientIdentifier) { - ErrorUtilities.VerifyHost(false, "Client identifiers \"{0}\" and \"{1}\" do not match.", this.credential.UserName, clientIdentifier); + if (this.credential != null) { + ErrorUtilities.VerifyHost( + String.Equals(this.credential.UserName, clientIdentifier, StringComparison.Ordinal), + "Client identifiers \"{0}\" and \"{1}\" do not match.", + this.credential.UserName, + clientIdentifier); } request.Credentials = this.credential ?? new NetworkCredential(clientIdentifier, this.clientSecret); |