Thread
:
PyCherry Help? Is this safe?
View Single Post
Jan 24th, 2006, 8:36 AM
#
3
Cerulean
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power:
4
Heh. Just make sure the GET string you receive has no wacko characters in it - I tend to just only allow alphanumerics, underscores, dashes, and single dots
(
Toggle Plain Text
)
s = "../.../bar" while s.count(".."): s = s.replace("..", ".") # s == "././bar", aka "bar"
s = "../.../bar" while s.count(".."): s = s.replace("..", ".") # s == "././bar", aka "bar"
Cerulean
View Public Profile
Visit Cerulean's homepage!
Find More Posts by Cerulean