effigies / BitTornado

UNMAINTAINED - John Hoffman's fork of the original bittorrent
Other
150 stars 44 forks source link

Sanitize MetaInfo constructor arguments. #17

Closed samhocevar closed 8 years ago

samhocevar commented 8 years ago

Since the MetaInfo class is now more robust than before, make_meta_file() needs to sanitize the arguments it sends to its constructor. This patch filters out all dictionary keys unknown to MetaInfo.

Without this patch, make_meta_file() always crashes.

effigies commented 8 years ago

Thanks. I ran into these issues myself, and have a branch with some initial ideas for fixes. This is definitely simpler, so I may end up going with this. Especially since I don't have much time to think about BitTornado at the moment.