AspNetIdentity icon indicating copy to clipboard operation
AspNetIdentity copied to clipboard

Default expected stamp to empty string when null

Open moros opened this issue 7 years ago • 0 comments

I discovered a flaw within the ValidateAsync method around expected stamp. The GenerateAsync method if it reads NULL out of GetSecurityStampAsync will write an empty string into the memory stream. I assume that is the case because one can not write NULL into a memory stream but if the security stamp column in the database is NULL, validating a token will fail.

The simplest fix seems to be to default the expected stamp to an empty string when none is found.

moros avatar Jun 27 '18 17:06 moros