summaryrefslogtreecommitdiffstats
path: root/projecttemplates/WebFormsRelyingParty/Code/Utilities.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-11-12 23:52:27 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-11-12 23:52:27 -0800
commit6c7a41277312bfc42aabf5ecbe5fc58e99243f37 (patch)
treeaa432a97b2c7db8532939fd43c7faccca62e2488 /projecttemplates/WebFormsRelyingParty/Code/Utilities.cs
parentf7c578cc7c7713de3348a839d0d9caeba643a33d (diff)
downloadDotNetOpenAuth-6c7a41277312bfc42aabf5ecbe5fc58e99243f37.zip
DotNetOpenAuth-6c7a41277312bfc42aabf5ecbe5fc58e99243f37.tar.gz
DotNetOpenAuth-6c7a41277312bfc42aabf5ecbe5fc58e99243f37.tar.bz2
Fixed a bunch of bugs in the project template's oauth sp implementation.
Diffstat (limited to 'projecttemplates/WebFormsRelyingParty/Code/Utilities.cs')
-rw-r--r--projecttemplates/WebFormsRelyingParty/Code/Utilities.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/projecttemplates/WebFormsRelyingParty/Code/Utilities.cs b/projecttemplates/WebFormsRelyingParty/Code/Utilities.cs
index a211cad..8a49703 100644
--- a/projecttemplates/WebFormsRelyingParty/Code/Utilities.cs
+++ b/projecttemplates/WebFormsRelyingParty/Code/Utilities.cs
@@ -52,7 +52,7 @@ namespace WebFormsRelyingParty.Code {
public static void VerifyCsrfCookie(string secret) {
var cookie = HttpContext.Current.Request.Cookies[csrfCookieName];
if (cookie != null) {
- if (cookie.Value == secret) {
+ if (cookie.Value == secret && !string.IsNullOrEmpty(secret)) {
// Valid CSRF check. Clear the cookie and return.
cookie.Expires = DateTime.Now.Subtract(TimeSpan.FromDays(1));
cookie.Value = string.Empty;