I need to find a way to validate an image that is base64 encoded in PHP.
By validate i'm thinking of XSS and other security things like that.
The flow is:
User has some parameters where one og more in a base64 encode string of an image and post them to my site. When i receive the parameter fx called img1 with the base64 encoded image string as value.
I would then like to make sure that this base64 encoded string only consist of the image and doest not have any tags and any other things hackers will try to use.
Does anyone know any PHP functions or plugins that can help me?