We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 179da58 commit 16bf25fCopy full SHA for 16bf25f
tests/flask_tests.py
@@ -817,6 +817,21 @@ def test_safe_access(self):
817
else:
818
assert 0, 'expected exception'
819
820
+ # testcase for a security issue that may exist on windows systems
821
+ import os
822
+ import ntpath
823
+ old_path = os.path
824
+ os.path = ntpath
825
+ try:
826
827
+ f('..\\__init__.py')
828
+ except NotFound:
829
+ pass
830
+ else:
831
+ assert 0, 'expected exception'
832
+ finally:
833
+ os.path = old_path
834
+
835
836
class SendfileTestCase(unittest.TestCase):
837
0 commit comments