The problem here is authentication, basically, you want to prevent anyone from updating any elses data store.
The most obvious solution for this is to send an additional parameter that is difficult to enumerate (hashes are a good example) and that is assigned to only one instance of your extension (so that each user creates their own hash authentication).
In order for this hash to be effective, it is important that it not be guessed. Do not create a hash solely on the basis of static material, such as ip-adressess or user agent strings.
You can include these static lines to make conflicts less likely: [pseudo] sha1 (ip_address + user_agent + random_integer).
So, basically for you this ends with the following: let the extension generate a hash for the current instance, if it is being executed for the first time, make an initial request to your server to "register" this new instance, and all subsequent requests that have this hash, will be authenticated in this instance.
also use SSL encrypted connections to prevent sniffing.
Please do not solve this with security through the obscurity as XORing is everywhere, people will find out.
Oh, and by the way, if the problem is data integrity, you can't fix it. The transmitted data is always provided by the user, since everything that the computer does is under the control of this user (presumably).
Garuda
source share