Home>

Is there any way to fix the vulnerability in the clicker game I'm making. The essence of the vulnerability: when you click on a picture, a certain number of points is added on the screen (in my case, this is one point). But, if you open the developer tools and correct the number 1 in the file main.js to the number 100 , then one hundred points will be added. Thus, the player can get unlimited points in one click. Vanilla JavaScript. Event handler code:

const clicker= document.querySelector ('. clicker');
clicker.addEventListener ('click', ()= >
{
  value += 1 //at this point you can put any number
  valute.innerHTML= value.toString ();
});

what happens to these glasses then? Are they stored on the server? Have an authorization? What kind of table of results of the players? If there is nothing, then let him deceive himself)

Pavel Nazarian2021-11-10 10:27:46

When you click, a request is sent to the server and points are added there according to the amount that you set up THERE

Алексей Шиманский2021-11-10 10:45:51