Change cookie store method
All cookies are stored as plain text, that is very insecure, the wallet is exposed to many types of attacks on the client, in addition, this problem is in the cookies of the wallet and in the main server
server.duinocoin.com

wallet.duinocoin.com

Hello, could you prepare a pull request to help change that? Thanks!
the problem is that you use the "encodeURIComponent ()" method only, and really the only thing that this method does only converts the characters that cannot be used in URLs, but once "encodeURIComponent ()" is passed, then it would have to be encrypted before save the data in Cookies

That information should also be decrypted every time it is sent to the authentication system, although thinking from a long-term point of view, it would be great to be able to send the password always encrypted and not need all this code

In short, an arrangement of the cookies is not necessary, rather, it would be necessary to maintain this system but changing its philosophy, encrypting the password from the beginning every time it is sent or stored on any server or DUCO system, I am not an expert In JS rather, I know practically nothing about JS but I would like someone to contact me or directly fix this big security problem Kiokia1212 on DUCO and Discord
You can make the server when you send the password for login accept the encrypted password, then you save the bcrypt in the cookie and send the bcrypt to the server to compare hashes
Something like
LOGI,LDarki,$2a$10$.....
They can do many things, but definitely leaving sensitive information in plain text and sending it through endpoints and http APIs is not a good idea.
I've been thinking and I'm not sure I'm following. You don't want the password to be stored in the browser, but still you remember it in your head? Counter intuitive if you ask me
passwords and plain text are definitely not a good idea in terms of security, besides they complicate many other tasks, if you want to verify the password you compare hashs with those of the cookie and the server
Right, but what's wrong with them if they're encrypted where it's needed - on the server with bcrypt? I'm probably wrong, but I really can't see the issue
Besides the fact, what I don't want is the password to be stored in plain text, I want it to be hashed or encrypted in some way to be secure, and thinking ahead I repeat that something like a "monetary or economic" system you cannot have this type of security vulnerabilities, I explain myself better now in the next post
I'm saying it is encrypted - here's my password as stored on our servers - try to get to my account with it:
$2b$12$FeR6/hOuk9dH9KTKfRnzEOA5Rrc5zAb2Q/WLcDHfB4jw40Qp9rfda
You should also consider the fact, that this is in fact a for fun project, so it does not need any biometric-level authentication
The encryption would be considered as soon as you create an account, you send the password only once, the server puts it in the hashing system that is implemented and then it would return some type of key with which the user's password is hashed and it is checked if the hash resulting is equivalent to stored
This topic is not for me it seems, I wouldn't even know why and how to add such a functionality. Sorry for that, maybe someone on a higher level will be able to implement it
This topic is not for me it seems, I wouldn't even know why and how to add such a functionality. Sorry for that, maybe someone on a higher level will be able to implement it
I am not an expert in computer security but a good security should be implemented in the passwords, especially in the API and cookies to avoid attacks such as Cross-site scripting or packet sniffing
Hi,afaik there are ways to avoid cookies with the credentials in plain text. One possible solution is to use session-id. The client visit https://wallet.duinocoin.com, enter username and password , the server check if they are correct and if they match, it will assign a session-id cookie to the client. In this way, your browser will store just a temporary randomic string for that session instead of username and password. I'm not into JavaScript too much but there are examples on how to do this (https://medium.com/developers-tomorrow/understanding-how-cookie-and-session-in-javascript-3af858fa8112) Furthemore, there are cookie options/flags that you can set for even more security. HttpOnly option will block access from JavaScript to the cookie, thus preventing cookie manipulation from malicious actor. Secure option will send the cookie only over HTTPS (anyway it seems wallet.duinocoin.com already force using https)
In most of cases you need to edit the server side, not only javascript
yes, server side changes will be needed too. Assuming duino server is using nodejs and postgres, this tutorial could help: https://www.youtube.com/watch?v=25GS0MLT8JU
An authentication token will be implemented shortly which will prevent password saving in plain text. When made and works as expected i´ll close this issue
Done, You can see it here. I`ll close this issue