coxmediagroup/lazythumbs — Issue #1: Sanitize tainted img_path
Author: datagrok
Created: 2012-02-09 20:04:02+00:00
State: open

img_path is captured with a generous (.*), passed to the view, and eventually becomes a filesystem path. I'm not smart enough to spot all the possible security implications but I think we should at least be safe by lstripping / from img_path before passing to os.path.join and raising an exception if we see something scary like '..' in there.