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

profile picture image type determined by file name instead of file contents #4342

Closed
ghost opened this issue Jun 16, 2017 · 3 comments
Closed
Labels
A-Avatar P3 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@ghost
Copy link

ghost commented Jun 16, 2017

Profile pictures of unknown image types are not used in rooms. The image type is determined by the file name extension rather than the file's contents. This means that even if the image is of a known type, it does not appear in rooms.

For example, create a PNG image with the name "avatar.png?12345" or "avatar.foo" and make it your profile picture. You will no longer have a profile picture in rooms you are in. Rename the file to "avatar.png" and upload again. Now it will work correctly and your profile picture will appear in rooms.

To correct this, determine the image type from the contents of the file instead of the name.

@turt2live
Copy link
Member

Related: #3873

@lampholder lampholder added T-Defect S-Minor Impairs non-critical functionality or suitable workarounds exist P3 labels Jun 20, 2017
@t3chguy
Copy link
Member

t3chguy commented Dec 3, 2021

The determination of image type is done by the browser, not by Element. We rely on File::type

@t3chguy
Copy link
Member

t3chguy commented May 17, 2022

Closing as bundling a file magic header sniffer would be unrealistic, we rely on the tools provided by the browser.

@t3chguy t3chguy closed this as completed May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Avatar P3 S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

4 participants