anderly / SimpleMembership.Mvc3.Sample

3 stars 3 forks source link

Gaping security hole in ForgotPassword functionality #2

Open jbubriski opened 11 years ago

jbubriski commented 11 years ago

Right now you allow the user to provide an email address to where the password reset email will be sent, but you do not verify that it belongs to the account. Really, the user shouldn't pass in an email address at all. The email address should be the one from the database related to the account with the given username.

anderly commented 11 years ago

John,

Thanks for submitting this. Another user actually brought this up on my blog and I felt I should clarify the issue and the sample code.

I have this noted as an issue on the project Trello board, but I haven't gotten around to updating it with a generic solution because of the limitations of the underlying provider.

A short-term solution may just be to remove email from ForgotPassword.cshtml to remove any confusion for users of the sample package. Please feel free to submit a patch for this if you have some ideas and I'll be happy to include it.

Thanks again,

Adam