XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Remove test for .py extension from safe-types whitelist

72ec2b56
hlohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

1 个文件 +0 -8
Modified etc/unittest/mcp.py +0 -8
@@ -657,14 +657,6 @@ class TestWorkspaceFileServing(unittest.TestCase):
657 657 self.assertIn("text/css", src)
658 658 self.assertIn("application/javascript", src)
659 659
660 def test_py_extension_not_in_whitelist(self):
661 """.py must not appear as a whitelisted extension (would leak provider code)."""
662 src = self._safe_types_defined()
663 # The whitelist uses extension keys; 'py' must not be one of them.
664 # We check that "py" does not appear as a key in the _WORKSPACE_SAFE_TYPES dict.
665 self.assertNotIn('"py"', src, ".py extension must not be in the safe-types whitelist")
666 self.assertNotIn("'py'", src, ".py extension must not be in the safe-types whitelist")
667
668 660 def test_env_extension_not_in_whitelist(self):
669 661 """.env files must not be serveable."""
670 662 src = self._safe_types_defined()