View Single Post
  #8   Spotlight this post!  
Unread 30-08-2010, 20:58
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 802
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Im doing something wrong here (python)

Quote:
Originally Posted by Robototes2412 View Post
how would you reccomend i proceed with as little security vulnerabilities as possible?
Web searches recommend JSON, which makes a lot of sense given how the format is put together. Use the cjson module or another similar module to parse JSON rather than eval as you have above. That will do sanity checks rather than blindly trust the code. I was going to recommend pickling until I started reading about the security of pickling. The format is designed for ease of use over security, sadly. It's an interesting read if you are interested in that type of thing.