This is my situation: a user uploads a pdf file to my server. The data travels encoded in base64 (like a regular input in a form). The base64 is saved in one particular file on my server. Now, another user wants to access that pdf, so he calls an specific endpoint of my server that returs the base64 encoded pdf string (in a json, among other data).
Now, to show the pdf, i am using the html object tag, like this:
<object id="byte_content" data="" type="application/pdf" width="100%" height="450px"></object> ... document.getElementById('byte_content').data = 'data:application/pdf;base64,'+json.base64pdf;
Finally, these are my questions:
- At server side, if I don't ever open/execute the file that contains the base64 string, I am protected from any kind of attack, right?
If you need any more specific info, please tell. Sorry for my bad english, and thanks in advance.