Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Un-Serialising data from a file, without eval

$
0
0

I'm playing with writing data to a file so that it can persist between sessions. I'm using

f.write(data.toSource());

to save my data, where f is my file object, and

var data = eval(f.read());

to get the data back from the file. But that seems like a very insecure way of doing things. Sure it's unlikely that anyone is going to use, AEscript preference files as a backdoor, but that's still just security through obscurity.

 

Is there a way to read serialised data from a file without using eval()? Or do I have to roll-my-own parser / serialiser to do it safely?


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>