Skip to content

Commit

Permalink
Added testcase for an issue that may exist on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Dec 23, 2010
1 parent b92120b commit 11c66be
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/flask_tests.py
Expand Up @@ -996,6 +996,21 @@ def test_safe_access(self):
else:
assert 0, 'expected exception'

# testcase for a security issue that may exist on windows systems
import os
import ntpath
old_path = os.path
os.path = ntpath
try:
try:
f('..\\__init__.py')
except NotFound:
pass
else:
assert 0, 'expected exception'
finally:
os.path = old_path


class SendfileTestCase(unittest.TestCase):

Expand Down

0 comments on commit 11c66be

Please sign in to comment.