Improve security
This commit is contained in:
@@ -24,6 +24,7 @@ class AttachmentSecurityTests(SimpleTestCase):
|
||||
size=32,
|
||||
)
|
||||
|
||||
@override_settings(ATTACHMENT_ALLOW_PRIVATE_URLS=False)
|
||||
def test_blocks_private_url_by_default(self):
|
||||
with self.assertRaises(ValueError):
|
||||
validate_attachment_url("http://localhost/internal")
|
||||
|
||||
Reference in New Issue
Block a user