HOWTO实现传统的ASP同步标记模式 [英] howto implement Synchronizer Token Pattern in classic asp
本文介绍了HOWTO实现传统的ASP同步标记模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
要prevent CSRF我要实现我的经典ASP应用程序的同步标记模式。
to prevent CSRF I want to implement the Synchronizer Token Pattern in my classic asp application.
据我了解,iIshould产生的Session_OnStart令牌。我不明白的是如何产生这样一个道理,因为它应该是随机的和独特的。因此,一个简单的Rnd(),并随机将无法正常工作,对吧?
I understand that iIshould generate a token in session_onstart. What I do not get is how to generate such a token as it should be random and unique. So a simple Rnd() and randomize will not work, right?
此外应该以任何方式被散列?怎么样?
Furthermore should it be hashed in any way? How?
感谢您的任何提示...
Thanks for any hints...
推荐答案
您可以使用GUID作为令牌: -
You could use a GUID as token:-
Function GetGUID()
GetGUID = CreateObject("Scriptlet.TypeLib").GUID
End Function
这篇关于HOWTO实现传统的ASP同步标记模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文