3 ms·
Can't we reduce the risk of these accidental disclosures by using public/private key encryption? Ie: - server publishes a public key on a fixed url - your JS
by unilynx 8y ago
Can't we reduce the risk of these accidental disclosures by using public/private key encryption? Ie:
- server publishes a public key on a fixed url
- your JS framework (react/angular/form handling/whatever) is modified to, whenever you query the value of a input[type=password], to return a value encrypted with the private key. (as close to the reading of the field as possible, except for eg. 'repeat password' handling)
- your serverside code decrypt the password as close to their 'VerifyPassword' and 'UpdatePassord' implementation as possible. and fail if they receive an unencrypted password.
This would make it very hard for intermediate steps (middleware, RPC/REST/JSON decoding) to accidentally spill the password, even if they fully log the traffic, and is something frameworks should be able to help you enforce.