mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 16:34:47 -04:00
Prevent the media store from writing outside of the configured directory
Also tighten validation of server names by forbidding invalid characters in IPv6 addresses and empty domain labels.
This commit is contained in:
parent
9f9d82aa84
commit
91f2bd0907
5 changed files with 483 additions and 50 deletions
|
@ -36,8 +36,11 @@ class ServerNameTestCase(unittest.TestCase):
|
|||
"localhost:http", # non-numeric port
|
||||
"1234]", # smells like ipv6 literal but isn't
|
||||
"[1234",
|
||||
"[1.2.3.4]",
|
||||
"underscore_.com",
|
||||
"percent%65.com",
|
||||
"newline.com\n",
|
||||
".empty-label.com",
|
||||
"1234:5678:80", # too many colons
|
||||
]
|
||||
for i in test_data:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue