JavaScript Security with cloud functions using parse.com security with cloud computing,security with cloud service,security camera

I am working with parse.com and looking at making my app secure. I think I have understood well the basics principles of the ACL, CLP, and Cloud functions. My main question comes from the Part IV of the parse.com blog.. By using a cloud function, I should be securing my app, but what prevents someone to call this cloud function multiple time ? The example is the following define in the cloud :

Parse.Cloud.define("like", function(request, response) {
  var post = new Parse.Object("Post");
  post.id = request.params.postId;
  post.increment("likes");
  post.save(null, { useMasterKey: true }).then(function() {
    response.success();
  }, function(error) {
    response.error(error);
  });
});

This should be used in my JS code as:

 Parse.Cloud.run('like', {postId : theIdOfMyPost}).then(function(results){
        // ok
    }, function(err) {
      console.log(err);
    });

Now, if someone looks at my code, he will understand quite quickly what is going on, just call/run this cloud function multiple times, and likes on the post will raise. This is not much of a big deal here, but this could lead to a security breach in more complicated app I believe ?

Answer:1

I have a method for validating a string, I want that method to return a Promise as the validations being ran may be asynchronous. The issue I am having however is one of performance, I want the ...

I have a method for validating a string, I want that method to return a Promise as the validations being ran may be asynchronous. The issue I am having however is one of performance, I want the ...

I have an array of data objects about people. Each person object includes 0-n URLs for additional info (guests of the person). I want to process this list, calling each of the 'guest' URLs and ...

I have an array of data objects about people. Each person object includes 0-n URLs for additional info (guests of the person). I want to process this list, calling each of the 'guest' URLs and ...

Performing For..Loops or While..Loops does not update the $scope variable. I'm trying to show the progress as loops are incremented. I have read (http://jimhoskins.com/2012/12/17/angularjs-and-apply....

Performing For..Loops or While..Loops does not update the $scope variable. I'm trying to show the progress as loops are incremented. I have read (http://jimhoskins.com/2012/12/17/angularjs-and-apply....

  1. angularjs loop not updating

I'm studying rxjs Observables and I couldn't understand why the setInterval inside Observable.create is still running even I have unsubscribe to that observable object. Observable is async right? When ...

I'm studying rxjs Observables and I couldn't understand why the setInterval inside Observable.create is still running even I have unsubscribe to that observable object. Observable is async right? When ...