diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-01-27 08:19:20 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-01-29 10:39:00 -0800 |
commit | eb2fe80ed606932a983bb8002c132a98514db827 (patch) | |
tree | 944f9e57a51eb92da4b169d85c09487b15288432 /src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/SigningBindingElement.cs | |
parent | 8dc4fc1e94fd0c4f7b34e68da67cb81efab504d7 (diff) | |
download | DotNetOpenAuth-eb2fe80ed606932a983bb8002c132a98514db827.zip DotNetOpenAuth-eb2fe80ed606932a983bb8002c132a98514db827.tar.gz DotNetOpenAuth-eb2fe80ed606932a983bb8002c132a98514db827.tar.bz2 |
OpenID messages that are missing signed parameters now throws ProtocolException instead of KeyNotFoundException.
Fixes #45
Diffstat (limited to 'src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/SigningBindingElement.cs')
-rw-r--r-- | src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/SigningBindingElement.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/SigningBindingElement.cs b/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/SigningBindingElement.cs index 95a748e..d14ca8a 100644 --- a/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/SigningBindingElement.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/SigningBindingElement.cs @@ -128,8 +128,8 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { // of check_authentication with its original id_res so the signature matches. MessageDictionary dictionary = this.Channel.MessageDescriptions.GetAccessor(signedMessage); var parametersToSign = from name in signedMessage.SignedParameterOrder.Split(',') - let prefixedName = Protocol.V20.openid.Prefix + name - select new KeyValuePair<string, string>(name, dictionary[prefixedName]); + let prefixedName = Protocol.V20.openid.Prefix + name + select new KeyValuePair<string, string>(name, dictionary.GetValueOrThrow(prefixedName, signedMessage)); byte[] dataToSign = KeyValueFormEncoding.GetBytes(parametersToSign); string signature = Convert.ToBase64String(association.Sign(dataToSign)); |