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

Mastodon doesn't handle gifs from other software correctly #7345

Open
zcdunn opened this issue May 3, 2018 · 14 comments
Open

Mastodon doesn't handle gifs from other software correctly #7345

zcdunn opened this issue May 3, 2018 · 14 comments
Labels
bug

Comments

@zcdunn
Copy link

@zcdunn zcdunn commented May 3, 2018

Gifs from other federated software aren't shown inline. This is likely a result of the change to convert gifs from mastodon to mp4.

Example: https://pleroma.soykaf.com/objects/92e72df2-6387-40cb-a10c-e1826a074751

@Gargron

This comment has been minimized.

Copy link
Member

@Gargron Gargron commented May 3, 2018

they only convert gifs to mp4 when posted, so if another implementation posts a gif, they don't recognize it

This is plain wrong and inaccurate. Accepted formats and conversion rules apply equally to local and remote posts

@nightpool

This comment has been minimized.

Copy link
Member

@nightpool nightpool commented May 3, 2018

that status is indeed broken, but gifs in general are not. don't believe everything lain tells you lol

@zcdunn

This comment has been minimized.

Copy link
Author

@zcdunn zcdunn commented May 3, 2018

I didn't believe it because Lain said it. I believed it because the gif in the post doesn't show up and I've seen this happen before

@nightpool

This comment has been minimized.

Copy link
Member

@nightpool nightpool commented May 4, 2018

classic paperclip spoof validation

May  3 07:24:54 neo bundle[8852]: [paperclip] Content Type Spoof: Filename e9f871e47dcc0631.gif
(video/mp4 from Headers, ["image/gif"] from Extension), content type discovered from file command:
video/mp4. See documentation to allow this

let's see here..... maybe this is an Accept headers situation? can't reproduce it with wget + file alone.

@Gargron

This comment has been minimized.

Copy link
Member

@Gargron Gargron commented May 4, 2018

video/mp4 from Headers

Wuuut. This confuses me. That means Content-Type header in the response right? Not the first bytes of the file or whatever? Does the origin server return that header, or is that indeed a bug where we set that header somewhere somehow?

@Gargron

This comment has been minimized.

Copy link
Member

@Gargron Gargron commented May 4, 2018

attachment.instance.file_content_type = 'video/mp4'
This would be the only place I could think of, but this is set after transcoding: by that point, the GIF is definitely not a GIF anymore, and the filename is adjusted with the correct extension, so there should be no mismatch in validation at all.

@nightpool

This comment has been minimized.

Copy link
Member

@nightpool nightpool commented May 4, 2018

That code hasn't been changed in years though, unless we just never federated gifs and always federated mp4s?

image

@nightpool

This comment has been minimized.

Copy link
Member

@nightpool nightpool commented May 4, 2018

hnmm. I know I have seen gifs from gnu social, but maybe paperclip broke this recently and noone noticed.

@Gargron

This comment has been minimized.

Copy link
Member

@Gargron Gargron commented May 4, 2018

Which instance did this get discovered on? Latest stable release is on Paperclip 5.1, unreleased master is on Paperclip 6.0. It could be conceivable that something broke between 5.1 and 6.0

@nightpool

This comment has been minimized.

Copy link
Member

@nightpool nightpool commented May 4, 2018

i've been checking cybre logs, so stable-ish

@zcdunn

This comment has been minimized.

Copy link
Author

@zcdunn zcdunn commented May 4, 2018

I noticed the issue from my account on toot.cafe

@djoerd

This comment has been minimized.

Copy link

@djoerd djoerd commented Aug 23, 2018

On our intance, GIFs from other instances are not shown, see:
https://mastodon.utwente.nl/@hiemstra/100600152117840221

@Gargron Gargron added the bug label Oct 20, 2018
@trwnh

This comment has been minimized.

Copy link
Contributor

@trwnh trwnh commented Dec 22, 2019

this is still happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.