1

So I read somewhere that storing object into Redis using pickle (Python) could result in malicious code running (It being binary data)
In context to this, I want to store an array of object created by end-user as cache in Redis. The best solution that I have come up with is to stringify the object and create an array of strings.

My concern is since the object will be created by the end-user is it safe to use the aforementioned method of converting JSON to BSON or work with stringify with Redis (I am using javascript)?

Data Eg:

[{"fname": "temp.txt", "size": 50, "type":"pdf", "mt": "Timestamp"},{..},...]

PS: I will be using javascript and not python. Also, any alternate solution which is faster/safer is welcomed.

Karan Gaur
  • 809
  • 7
  • 20

0 Answers0