Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix failed media with MSC3916 "Authentication for media" #2184

Open
mahdi1234 opened this issue Sep 6, 2024 · 1 comment
Open

Matrix failed media with MSC3916 "Authentication for media" #2184

mahdi1234 opened this issue Sep 6, 2024 · 1 comment
Labels

Comments

@mahdi1234
Copy link

mahdi1234 commented Sep 6, 2024

With recent switch on many matrix servers to authenticated media, matterbridge doesn't handle it correctly anymore even when Media server set. With v1.26.0

time="2024-09-06T13:23:47+02:00" level=debug msg="== Receiving event: &gomatrix.Event{StateKey:(*string)(nil), Sender:"@someaccount:matrix.org", Type:"m.room.message", Timestamp:1725621827645, ID:"$someid", RoomID:"!someroom:matrix.org", Redacts:"", Unsigned:map[string]interface {}{"age":301, "membership":"join"}, Content:map[string]interface {}{"body":"barcode.gif", "info":map[string]interface {}{"h":100, "mimetype":"image/gif", "size":1676, "w":100, "xyz.amorgan.blurhash":"xyz"}, "m.mentions":map[string]interface {}{}, "msgtype":"m.image", "url":"mxc://matrix.org/someurl"}, PrevContent:map[string]interface {}(nil)}" func=handleEvent file="bridge/matrix/matrix.go:484" prefix=matrix
time="2024-09-06T13:23:48+02:00" level=debug msg="Trying to download "barcode.gif" with size 1676" func=HandleDownloadSize file="bridge/helper/helper.go:162" prefix=matrix
time="2024-09-06T13:23:48+02:00" level=debug msg="Download OK "barcode.gif" 45" func=HandleDownloadData2 file="bridge/helper/helper.go:183" prefix=matrix

In the snippet above, there was image called barcode.gif with size of 1676 bytes posted, but in reality only 45 bytes downloaded.

Content of that file shows it wasn't properly authenticated.

cat ./barcode.gif 
{"errcode":"M_NOT_FOUND","error":"Not found"}

Here's some context:
matrix-org/matrix-spec-proposals#3916
https://matrix.org/blog/2024/06/26/sunsetting-unauthenticated-media/

@mahdi1234 mahdi1234 added the bug label Sep 6, 2024
@mahdi1234 mahdi1234 changed the title Matrix failed images with MSC3916 "Authentication for media" Matrix failed media with MSC3916 "Authentication for media" Sep 6, 2024
@Vetgans
Copy link

Vetgans commented Sep 12, 2024

Can confirm.

I can still receive images, but not send them anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants