开发者

Is it safe saving credential data in session state for short period of time?

开发者 https://www.devze.com 2023-02-02 04:37 出处:网络
Because of some situation , I had to开发者_如何学JAVA saveusers password in session state for short period of time .

Because of some situation , I had to开发者_如何学JAVA save users password in session state for short period of time . You think is it unsafe holding some important data in session state?


Never store the unencrypted password of the user (not in session state and not in the DB either!). Take a salted hash and forget the plain text password immediately. If you need to, you can then keep the hash in the session state.


How secure is your Server (Farm)?

It's not ideal but it does not sound terribly dangerous either.

You will have to think about who do you want to keep it from.


Most languages provide support for MD5 or SHA-1. Use one of them.


better way is keep a hash in session. or else you can generate your own encrypted session key and store it in Session. you can keep it in Cookies also.


generate MD5 and keep it in session. thats the secure way. or else as mentioned by Shiromi, you can generate your own session key. then keep this in session.

0

精彩评论

暂无评论...
验证码 换一张
取 消