summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-04-16 08:35:34 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-04-16 08:35:34 -0700
commitbb006ecbec46546104de88db21a2114f23565a37 (patch)
tree4bdcfbe7b21205ee7c9a529db3902e9ff3133e7b /src
parentb68d433d86910261f370ad3296f09e6234d7db96 (diff)
downloadDotNetOpenAuth-bb006ecbec46546104de88db21a2114f23565a37.zip
DotNetOpenAuth-bb006ecbec46546104de88db21a2114f23565a37.tar.gz
DotNetOpenAuth-bb006ecbec46546104de88db21a2114f23565a37.tar.bz2
Fixed ProviderEndpoint control bug where it would try to process old messages on PostBacks.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OpenId/Provider/ProviderEndpoint.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/OpenId/Provider/ProviderEndpoint.cs b/src/DotNetOpenAuth/OpenId/Provider/ProviderEndpoint.cs
index a9e8030..bec510b 100644
--- a/src/DotNetOpenAuth/OpenId/Provider/ProviderEndpoint.cs
+++ b/src/DotNetOpenAuth/OpenId/Provider/ProviderEndpoint.cs
@@ -113,7 +113,12 @@ namespace DotNetOpenAuth.OpenId.Provider {
protected override void OnLoad(EventArgs e) {
base.OnLoad(e);
- if (this.Enabled) {
+ // There is the unusual scenario that this control is hosted by
+ // an ASP.NET web page that has other UI on it to that the user
+ // might see, including controls that cause a postback to occur.
+ // We definitely want to ignore postbacks, since any openid messages
+ // they contain will be old.
+ if (this.Enabled && !this.Page.IsPostBack) {
// Use the explicitly given state store on this control if there is one.
// Then try the configuration file specified one. Finally, use the default
// in-memory one that's built into OpenIdProvider.