diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-03 16:16:46 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-03 16:16:46 -0800 |
commit | b5572b44cd369b3a0ed825251f44f7e54a1714d4 (patch) | |
tree | 5387f80757a1bd56510d63d09d943c37d2427f61 /src | |
parent | 8abf278677e35d90ae2ab0a1c01c15181cbab012 (diff) | |
parent | 1475bce5e1c00266ed354fbc0513734be7ed705a (diff) | |
download | DotNetOpenAuth-b5572b44cd369b3a0ed825251f44f7e54a1714d4.zip DotNetOpenAuth-b5572b44cd369b3a0ed825251f44f7e54a1714d4.tar.gz DotNetOpenAuth-b5572b44cd369b3a0ed825251f44f7e54a1714d4.tar.bz2 |
Merge branch 'v3.0' into v3.1
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/Messaging/Reflection/MessageDescription.cs | 13 | ||||
-rw-r--r-- | src/DotNetOpenAuth/OpenId/Extensions/ExtensionArgumentsManager.cs | 10 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/DotNetOpenAuth/Messaging/Reflection/MessageDescription.cs b/src/DotNetOpenAuth/Messaging/Reflection/MessageDescription.cs index bc982ef..cadce44 100644 --- a/src/DotNetOpenAuth/Messaging/Reflection/MessageDescription.cs +++ b/src/DotNetOpenAuth/Messaging/Reflection/MessageDescription.cs @@ -116,8 +116,17 @@ namespace DotNetOpenAuth.Messaging.Reflection { /// </summary> /// <param name="parts">The key/value pairs of the serialized message.</param> internal void EnsureMessagePartsPassBasicValidation(IDictionary<string, string> parts) { - this.EnsureRequiredMessagePartsArePresent(parts.Keys); - this.EnsureRequiredProtocolMessagePartsAreNotEmpty(parts); + try { + this.EnsureRequiredMessagePartsArePresent(parts.Keys); + this.EnsureRequiredProtocolMessagePartsAreNotEmpty(parts); + } catch (ProtocolException) { + Logger.Messaging.ErrorFormat( + "Error while performing basic validation of {0} with these message parts:{1}{2}", + this.messageType.Name, + Environment.NewLine, + parts.ToStringDeferred()); + throw; + } } /// <summary> diff --git a/src/DotNetOpenAuth/OpenId/Extensions/ExtensionArgumentsManager.cs b/src/DotNetOpenAuth/OpenId/Extensions/ExtensionArgumentsManager.cs index 5c4e978..e33be0f 100644 --- a/src/DotNetOpenAuth/OpenId/Extensions/ExtensionArgumentsManager.cs +++ b/src/DotNetOpenAuth/OpenId/Extensions/ExtensionArgumentsManager.cs @@ -70,10 +70,12 @@ namespace DotNetOpenAuth.OpenId.Extensions { } // For backwards compatibility, add certain aliases if they aren't defined. - foreach (var pair in typeUriToAliasAffinity) { - if (!mgr.aliasManager.IsAliasAssignedTo(pair.Key) && - !mgr.aliasManager.IsAliasUsed(pair.Value)) { - mgr.aliasManager.SetAlias(pair.Value, pair.Key); + if (mgr.protocol.Version.Major < 2) { + foreach (var pair in typeUriToAliasAffinity) { + if (!mgr.aliasManager.IsAliasAssignedTo(pair.Key) && + !mgr.aliasManager.IsAliasUsed(pair.Value)) { + mgr.aliasManager.SetAlias(pair.Value, pair.Key); + } } } |