Javascript does not allow you to pass personal data or methods to objects, for example, in C ++. Oh, well, actually, yes, this happens through some workarounds related to closing. But, based on the Python background, I am inclined to believe that “pretending to be confidential” (through naming conventions and documentation) is good enough or even preferable to “enforced confidentiality” (according to Javascript itself). Of course, I can think of situations when this is not the case - for example. people interact with my code without RTFM, but they blame me - but I'm not in that situation.
But something gives me a pause. Javascript guru Douglas Crockford, in Javascript: The Good Parts and elsewhere, repeatedly refers to fake privacy as a security issue. For example, "an attacker can easily access fields directly and replace methods with his own."
I am confused by this. It seems to me that if I follow the minimum security rules (check, do not blindly trust, the data sent from the browser to my server, do not include third-party scripts on my site without checking them), then there is no situation where to pretend - privacy is less "safe" "than forced confidentiality. It is right? If not, then what is the situation where pretense - privacy and respect for privacy rights have security implications?
source share