diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-11-11 20:41:44 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-11-11 20:41:44 -0800 |
commit | 055b6567722346a0dbc2dfb1caa183b521c42f5c (patch) | |
tree | 97d4d1c4949c345bbe9b91003c20b54fd6cfd9b9 /src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | |
parent | 31376a37a587523c5b80dbcf3f21b26f1a6bcb76 (diff) | |
download | DotNetOpenAuth-055b6567722346a0dbc2dfb1caa183b521c42f5c.zip DotNetOpenAuth-055b6567722346a0dbc2dfb1caa183b521c42f5c.tar.gz DotNetOpenAuth-055b6567722346a0dbc2dfb1caa183b521c42f5c.tar.bz2 |
Fixes an InternalErrorException thrown when decoding corrupted access tokens.
Fixes #178
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs index 47d7f39..69b111d 100644 --- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs +++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs @@ -1015,7 +1015,7 @@ namespace DotNetOpenAuth.Messaging { missingPaddingCharacters = 0; break; default: - throw ErrorUtilities.ThrowInternal("No more than two padding characters should be present for base64."); + throw new ProtocolException(MessagingStrings.DataCorruptionDetected, new ArgumentException("No more than two padding characters should be present for base64.")); } var builder = new StringBuilder(base64WebSafe, base64WebSafe.Length + missingPaddingCharacters); builder.Replace('-', '+').Replace('_', '/'); |