Jump to content

Recommended Posts

Let's say users can create their own avatar with different items...

 

I have to so it will check against each item that was used on the HTML 5 canvas serverside.  So if user trys to use item with the id of 20 and uses it to make his avatar, it will result in an error.

 

 

The problem is, I need to check the items that I have already for them to chose from, and check to make sure the .png image code (data:image/png;base64) is the correct one.

 

Reason why, is because I don't want people making a new data:image/png;base64 code from a .png file and using tamper data.

 

Anyone to secure and loop through, check the data:image/png;base64's data to make sure it's correct?

 

I think I can pull each item's png data:image/png;base64 with javascript, but how the hell do I check it?

 

Do I need to make a new table with all the png data:image/png;base64 info in there and just use that to check it or what?

 

Wouldn't the string be way to long to use "==" operator? it's like a 10kb png file, so it's very long.

Binary comparisons aren't bad.

 

Checking in JavaScript isn't a good idea. It can be bypassed or manipulated because it's executing on the client's machine.

 

Perhaps storing a checksum (see hash) of the base64 data would be a good way to verify instead of comparing them directly.

Binary comparisons aren't bad.

 

Checking in JavaScript isn't a good idea. It can be bypassed or manipulated because it's executing on the client's machine.

 

Perhaps storing a checksum (see hash) of the base64 data would be a good way to verify instead of comparing them directly.

 

i dont check in javascript, it all needs to be serverside. 

 

the id's are passed by javascript, but that's the only way, same for the base64 data, again that's the only way for this certain project

 

i am trying this right now:

 

	
if ($_POST['data'] == "iVBORw0KGgoAAAANSUhEUgAAAFUAAABtCAYAAADQ3C2aAAAgAElEQVR4nO2dd2BT5ff%2Fr%2FpxoDIK3W3apE2b1STNapK22U3StE3SNk2b7j3ooJS2dEAhZa8ChVI2CIggUEUQEFFBBREUEWUpONgKypLdJO%2FfH379%2FPj40Y%2BoTOH1d55z3uf03vvce57zPCWIRzziEY94xCMe8YhHPOIRtwW7kvjX7AYpe9uMNNF6u6GXnSAev9eaHmQeW2FXPv%2FJdJNw20TDykPzbHs3jjfN6eyvGLR%2BZGLwvRb3QLK4TvfcO6MM44%2FMTT56ZkEmzsyx4a1WAypUVDSZBJ8saNbz77XGB47NdqX37lbdoQuT4nFkciL2Dtdi93ADJqXykRRORny43yZ7nvKZe63zgeLNSp7v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2FXyD%2Bbni9HoZqBEjX7WFMCW3o7Y7ivOD7Lprk6M%2Fl7dCYCU1PwbaMam8oVaNYxEOHrBkmg%2B5aYMH8l8TcPOPhhevKHWFOG7mU52Nkcf26IIjjpj0c9gHy3OFvseL30ONYVAKsLcWq0GXNSRRio4iKN43dGFtSnTeDb8y%2Ff9r8wW0A8%2Bd28tM%2BxrhToyseR8WbXEANr%2FO2I4b7iyDg969Ii2%2BfO96qA3Y24vjQXc7KjYRGGOLR031eMbG%2FD7fK1eaCEfGlF7nG8XQqsLcXlhZlYkC3%2B0Cr173u7fNwXYFFVqfOVQif2N%2BDyG9WYnSNBAi%2Fo7Zgwn2Qx9fbuFDlgV0c6Fqb%2FgLf7w%2FV%2BFfBqAfYNib9SKgz8Z61VHarX6i62J53fPy4eDdqQT3mkPgUi8p%2Brmd4qx0ZmhJweHn%2BmuysX2DkQWF2AC5NS0JEs3BlL70O%2BEz7vCVVU4ulaoXdKIqlfntKvxx3dEm63E49P0AWnHRhtPImPBsD1ehEujbHglUypK4Pv33GrC4qP%2BA1GaEJtN9b3B9bk4fIII9anCZAfQXEUR1Oy77W2B5YqKvXpz2akvop3y4GFWdhSKIaVS4KO5XN3D6b9p7GkRko9uab04NGF2ehM4aA8mvp1pjTo3p%2Fz96Azv0lrWmI3nZtTIN03xsB%2BOKpVdxq7nfXU%2BIGaxPY0Tti91vKIRzziEY%2F43%2Fw%2F4r7uZO3OfpkAAAAASUVORK5CYII%3D"){
echo "hey";
exit;
}else{
echo "nope..";
exit;
}

 

which does not work at all... and i roughly have no idea

 

i will be trying your hash method, any more details about the hash?

 

So pretty much create a hash code to be checked with for each image instead of trying to check it like I did above?

$fname = "./img/nrpg/swords/sword2.png";

$hash = hash_file( 'crc32', $fname );
echo "crc32  = $hash\n";

 

looks liek this shows:

 

b4e0499e

 

i can just put a row in the items_Table called "crc32" and check if that exists to this, if not error that user out for trying to be nawty!

 

OK awesome, this is alot shorter code!

 

 

now i just need to find a javascript function to use this same algorithm

 

Thanks xyph solved!!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.