How to secure AngularJS $http.post data?

浪子不回头ぞ 提交于 2020-01-05 05:10:10

问题


I came to a security concern while doing $http.post requests that are received by the backend of my app. I can see all the data that is being sent using for example firebug in Firefox.

Are third parties able to sniff this data? It would be disastrous if someone sniffed the password when someone registers a new account.

Is there a way to secure my AngularJS front-end so that someone won't be able to steal the data in the POST request?

Any advice will be appreciated :)


回答1:


No javascript can secure your password. Use SSL. Or better yet, use services your user are already registered to like Google, Facebook or any openID/oAtuh provider so we don't need to go thought the annoying process of creating a new unique password verify the email :)




回答2:


One of the ways to secure the data being set to/from the backend over HTTP/HTTPS is to not send them in plaintext. For example, it is possible to send md5 digests of login information in an ajax call – and authentication information like passwords etc. should also never be stored as plaintext in your database on the backend.

You might find this https://code.google.com/p/crypto-js/ interesting.



来源:https://stackoverflow.com/questions/25948230/how-to-secure-angularjs-http-post-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!