On 12 September 2011 16:00, Dr. Trigon dr.trigon@surfeu.ch wrote:
So this "IOError: [Errno 2] No such file or directory: ..." was NOT triggered because of an not existing file, BUT because of the syntax not accepted. I do not want to state that there is no possibility to cheat this way, but the obvious one suggested, does not work in python
Interesting theory, but not true:
valhallasw@nightshade:~$ cat > test.file blah valhallasw@nightshade:~$ python Python 2.7.1 (r271:86832, Jan 4 2011, 13:57:14) [GCC 4.5.2] on sunos5 Type "help", "copyright", "credits" or "license" for more information.
open("/home/valhallasw/src/../test.file").readlines()
['blah\n']
Please always double-check these things in security-related issues.
Best, Merlijn