Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed OpenID RP's CustomStore sample class that throws NullReferenceE…

…xception in some cases.

Thanks to Richard Collette for identifying the problem and suggesting the fix.
  • Loading branch information...
commit 33f507ca5708940cdab371f1b33045c1c308aef5 1 parent 01ff3ee
@AArnott AArnott authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
View
2  samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs
@@ -84,7 +84,7 @@ public class CustomStore : IOpenIdApplicationStore {
public CryptoKey GetKey(string bucket, string handle) {
var assocRow = dataSet.CryptoKey.FindByBucketHandle(bucket, handle);
- return new CryptoKey(assocRow.Secret, assocRow.ExpiresUtc);
+ return assocRow == null ? null : new CryptoKey(assocRow.Secret, assocRow.ExpiresUtc);
}
public IEnumerable<KeyValuePair<string, CryptoKey>> GetKeys(string bucket) {
Please sign in to comment.
Something went wrong with that request. Please try again.