summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-12-03 16:16:46 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-12-03 16:16:46 -0800
commitb5572b44cd369b3a0ed825251f44f7e54a1714d4 (patch)
tree5387f80757a1bd56510d63d09d943c37d2427f61 /src
parent8abf278677e35d90ae2ab0a1c01c15181cbab012 (diff)
parent1475bce5e1c00266ed354fbc0513734be7ed705a (diff)
downloadDotNetOpenAuth-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.cs13
-rw-r--r--src/DotNetOpenAuth/OpenId/Extensions/ExtensionArgumentsManager.cs10
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);
+ }
}
}