Preventing Cookie replay attacks in ASP.Net MVC

前端 未结 2 666
感情败类
感情败类 2021-01-12 18:26

I have been tasked with implementing point 4 in this article: http://support.microsoft.com/kb/900111

This involves using the Membership provider to add a comment to

2条回答
  •  Happy的楠姐
    2021-01-12 18:48

    Can I roll my own key value store of cookie values to logged in users and just make sure I clear this when a user hits the logout button.

    Yes, you can do this. The Membership Provider keeps a small set of data about the user (username, email, password, last login, lost password question, lost password answer, etc).

    If you don't want to retro fit a membership provider I would take the approach you mentioned. Whether the information is written to the comment field of the aspnet_Users table or a bit field in your own table, it shouldn't make any difference.

    You also might want to consider putting an interface your Membership/Authentication code. Then you could swap your current code to a Membership Provider implementation when it's more convenient.

提交回复
热议问题