diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-10-23 19:52:59 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-10-23 19:52:59 -0700 |
commit | 38c7d25878550429583558f5c907e34fb094fb68 (patch) | |
tree | c6edc9ee32d6d2031202040ac18cd2d288b3bb83 /src/DotNetOAuth/Messaging/Bindings/NonceMemoryStore.cs | |
parent | 7ba9649126a7b802e348fbe210383fabc2898659 (diff) | |
download | DotNetOpenAuth-38c7d25878550429583558f5c907e34fb094fb68.zip DotNetOpenAuth-38c7d25878550429583558f5c907e34fb094fb68.tar.gz DotNetOpenAuth-38c7d25878550429583558f5c907e34fb094fb68.tar.bz2 |
Applied FxCop fixes.
Diffstat (limited to 'src/DotNetOAuth/Messaging/Bindings/NonceMemoryStore.cs')
-rw-r--r-- | src/DotNetOAuth/Messaging/Bindings/NonceMemoryStore.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Messaging/Bindings/NonceMemoryStore.cs b/src/DotNetOAuth/Messaging/Bindings/NonceMemoryStore.cs index 05e0f13..98b93ff 100644 --- a/src/DotNetOAuth/Messaging/Bindings/NonceMemoryStore.cs +++ b/src/DotNetOAuth/Messaging/Bindings/NonceMemoryStore.cs @@ -56,6 +56,12 @@ namespace DotNetOAuth.Messaging.Bindings { /// <see cref="StandardExpirationBindingElement.MaximumMessageAge"/> property.
/// </remarks>
public bool StoreNonce(string nonce, DateTime timestamp) {
+ if (timestamp.ToUniversalTime() + this.maximumMessageAge < DateTime.UtcNow) {
+ // The expiration binding element should have taken care of this, but perhaps
+ // it's at the boundary case. We should fail just to be safe.
+ return false;
+ }
+
// TODO: implement actual nonce checking.
Logger.Warn("Nonce checking not implemented yet.");
return true;
|