How can I protect user data that can be obtained by means of an Ajax request?
For example, on the bulletin board page we have the button "show the user's phone number". When clicked, an Ajax request is sent to the server with the ad id . The server accepts, searches for a phone number in the database and sends it back to the user in the browser.
Question:
Having all these id ads, you can get a whole list of phone numbers of users. How to protect yourself from this? I saw on some sites besides id in the parameters send crc (hash), which is equal to a random character set. If the server does not receive the RIGHT crc , then no data is returned.
How can this interaction between the client and the server be organized through the generated keys?