Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def isSafe( fileName ):
- #cgi path # sisennä: 3 välilyöntiä
- exeFolder, scriptName = os.path.split(os.path.abspath(__file__))
- if "../" in html_page:
- print "Error: You cannot put ../ to the file path." # sisennä: 6 välilyöntiä
- return False
- if len( fileName ) > 40:
- print "Error: Too long file name."
- return False
- if scriptName in fileName:
- print "Error: Cannot have script name in this parameter."
- return False
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement