Skip to content

Default expected stamp to empty string when null#9

Open
moros wants to merge 1 commit intoaspnet:mainfrom
moros:fix/use-empty-string-when-stamp-null
Open

Default expected stamp to empty string when null#9
moros wants to merge 1 commit intoaspnet:mainfrom
moros:fix/use-empty-string-when-stamp-null

Conversation

@moros
Copy link

@moros moros commented Jun 27, 2018

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.

Base automatically changed from master to main March 15, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant