by treenyc · 12y ago · 0 comments
1. Store password in a function and return the password. 2. Whenever the password is needed call the function.
Example in JS.
function getPassword(){ return 'I am a password'; }
if(req.data.password == getPassword()){ passwordIsCorrect(); }else{ passwordIsNotCorrect(); }
This is not for sure. Core dump and debug dump usually dumps variables, but not the source code of program.
In an interpreted language, the interpreter would create some kind of string object containing the contents of the password in memory, and getPassword() would return that object when called.
Ruby, Python, RingoJS, NodeJS, PHP, etc? Don't think they have fancy function to determine to store the variables in CPU register or encrypted memory?
I got the feeling that all these should have being taken care of on the hardware level, but someone just got too lazy during the design process and forgot to patch up the security flaw.
Kinda like how everyone was still using telnet to get into their *nix servers in the 90's.
that more diverse the people are the more perspective we can look at a problem:
collective indulgence >= individual common sense
Thanks HN