Reputation: 243
What do you think about the vulnerability in Angular 4 ? Because it's in the client.
I would like to encrypt a data with a key (Javascript AES) and send it to my API. After this, I will decrypt the data in my api.
Do you think it's a vulnerability?
Thank you
Upvotes: 2
Views: 6992
Reputation: 3263
Firstly, to clarify. Using HTTP(S) already encrypts your data. Use an application such as WireShark to confirm this. Using HTTP (not HTTPS) is not advised as the payload can be read in the network as plain text.
If you still need further encryption (I would question why).
Secondly it depends where you are storing your data (I am assuming it is sensitive). If you are storing anything in the browser (Local Storage), then I strongly advise against this as it's not secure. The reason for this is because anyone could read such data using:
var yourSensitiveData = localStorage.getItem("your-data");
If you are saving data to Session Storage, then this is safe if implemented correctly because the data is only accessible between the client and server in which the session runs.
Hope this helps.
Upvotes: 1