@@ -41,6 +41,8 @@ func TestMediaFilenames(t *testing.T) {
4141 var filename = filename
4242
4343 t .Run (fmt .Sprintf ("Can download file '%s'" , filename ), func (t * testing.T ) {
44+ // Synapse no longer allows downloads over the unauthenticated media endpoints by default
45+ runtime .SkipIf (t , runtime .Synapse )
4446 t .Parallel ()
4547
4648 mxcUri := alice .UploadContent (t , data .MatrixPng , filename , "image/png" )
@@ -69,6 +71,8 @@ func TestMediaFilenames(t *testing.T) {
6971
7072 // sytest: Can download specifying a different ASCII file name
7173 t .Run ("Can download specifying a different ASCII file name" , func (t * testing.T ) {
74+ // Synapse no longer allows downloads over the unauthenticated media endpoints by default
75+ runtime .SkipIf (t , runtime .Synapse )
7276 t .Parallel ()
7377
7478 mxcUri := alice .UploadContent (t , data .MatrixPng , asciiFileName , "image/png" )
@@ -107,6 +111,8 @@ func TestMediaFilenames(t *testing.T) {
107111
108112 // sytest: Can download specifying a different Unicode file name
109113 t .Run ("Can download specifying a different Unicode file name" , func (t * testing.T ) {
114+ // Synapse no longer allows downloads over the unauthenticated media endpoints by default
115+ runtime .SkipIf (t , runtime .Synapse )
110116 t .Parallel ()
111117
112118 mxcUri := alice .UploadContent (t , data .MatrixPng , unicodeFileName , "image/png" )
@@ -136,6 +142,8 @@ func TestMediaFilenames(t *testing.T) {
136142
137143 // sytest: Can download with Unicode file name locally
138144 t .Run ("Can download with Unicode file name locally" , func (t * testing.T ) {
145+ // Synapse no longer allows downloads over the unauthenticated media endpoints by default
146+ runtime .SkipIf (t , runtime .Synapse )
139147 t .Parallel ()
140148
141149 mxcUri := alice .UploadContent (t , data .MatrixPng , unicodeFileName , "image/png" )
@@ -161,6 +169,8 @@ func TestMediaFilenames(t *testing.T) {
161169
162170 // sytest: Can download with Unicode file name over federation
163171 t .Run ("Can download with Unicode file name over federation" , func (t * testing.T ) {
172+ // Synapse no longer allows downloads over the unauthenticated media endpoints by default
173+ runtime .SkipIf (t , runtime .Synapse )
164174 t .Parallel ()
165175
166176 mxcUri := alice .UploadContent (t , data .MatrixPng , unicodeFileName , "image/png" )
@@ -185,11 +195,12 @@ func TestMediaFilenames(t *testing.T) {
185195 })
186196
187197 t .Run ("Will serve safe media types as inline" , func (t * testing.T ) {
188- if runtime .Homeserver != runtime .Synapse && runtime . Homeserver != runtime . Conduwuit {
198+ if runtime .Homeserver != runtime .Conduwuit {
189199 // We need to check that this security behaviour is being correctly run in
190- // Synapse or conduwuit, but since this is not part of the Matrix spec we do not assume
200+ // conduwuit, but since this is not part of the Matrix spec we do not assume
191201 // other homeservers are doing so.
192- t .Skip ("Skipping test of Content-Disposition header requirements on non-Synapse and non-conduwuit homeserver" )
202+ // Skip Synapse because it no longer allows downloads over the unauthenticated media endpoints by default
203+ t .Skip ("Skipping test of Content-Disposition header requirements on non-conduwuit homeserver" )
193204 }
194205 t .Parallel ()
195206
@@ -221,11 +232,12 @@ func TestMediaFilenames(t *testing.T) {
221232 })
222233
223234 t .Run ("Will serve safe media types with parameters as inline" , func (t * testing.T ) {
224- if runtime .Homeserver != runtime .Synapse && runtime . Homeserver != runtime . Conduwuit {
235+ if runtime .Homeserver != runtime .Conduwuit {
225236 // We need to check that this security behaviour is being correctly run in
226- // Synapse or conduwuit, but since this is not part of the Matrix spec we do not assume
237+ // conduwuit, but since this is not part of the Matrix spec we do not assume
227238 // other homeservers are doing so.
228- t .Skip ("Skipping test of Content-Disposition header requirements on non-Synapse and non-conduwuit homeserver" )
239+ // Skip Synapse because it no longer allows downloads over the unauthenticated media endpoints by default
240+ t .Skip ("Skipping test of Content-Disposition header requirements on non-conduwuit homeserver" )
229241 }
230242 t .Parallel ()
231243
@@ -259,11 +271,12 @@ func TestMediaFilenames(t *testing.T) {
259271 })
260272
261273 t .Run ("Will serve unsafe media types as attachments" , func (t * testing.T ) {
262- if runtime .Homeserver != runtime .Synapse && runtime . Homeserver != runtime . Conduwuit {
274+ if runtime .Homeserver != runtime .Conduwuit {
263275 // We need to check that this security behaviour is being correctly run in
264- // Synapse or conduwuit, but since this is not part of the Matrix spec we do not assume
276+ // conduwuit, but since this is not part of the Matrix spec we do not assume
265277 // other homeservers are doing so.
266- t .Skip ("Skipping test of Content-Disposition header requirements on non-Synapse and non-conduwuit homeserver" )
278+ // Skip Synapse because it no longer allows downloads over the unauthenticated media endpoints by default
279+ t .Skip ("Skipping test of Content-Disposition header requirements on non-conduwuit homeserver" )
267280 }
268281 t .Parallel ()
269282
0 commit comments