tweecode / twine

UI for creating hypertext stories
http://twinery.org
656 stars 97 forks source link

Do not use pickle #155

Open niccokunzmann opened 10 years ago

niccokunzmann commented 10 years ago

I opened a twine .tws file and saw it was saved with pickle. Pickle has serious drawbacks. One can write a virus that spreads through saved twine files without anyone noticing it. Maybe you want to consider this. There is another serializer used by Pyro which is called Serpent. Maybe you want to use that in future versions.

webbedspace commented 10 years ago

This is a worthwhile consideration. If the file format was to change from .tws, though, I feel like it'd want to make HTML be the replacement - the build format is the same as the save format (which is actually one of Twine 2's design goals).

(Actually, there is one problem with that - building a story with StoryIncludes is a unidirectional operation - the StoryIncludes passage is eliminated, and its imported passages are seamlessly included in the HTML file. So, I guess that'd have to be worked around first.)