Skip to content

[Bug report] Emotes have no set max width #161

@Sugaryyyy

Description

@Sugaryyyy

Describe the bug

emotes have no set max width, which can be abused to make very wide emotes that span the entire screen width. thankfully there's a max height so it's not a critical issue where someone can fill up the entire screen with a single emote
Image (the rest of the emote is off screen)

Reproduction

  1. Create emote with the size of 1000x1
  2. Upload it and post it in chat
  3. Profit (??)

Expected behavior

emote getting scaled down to not span the entire width of the screen

Platform and versions

1. OS: Arch Linux
2. Browser: Firefox 148.0 
3. Sable version: v1.6.0-dev 57cf8a2 (self hosted instance)
4. Matrix homeserver: Tuwunel 1.5.1

Additional context

the issue could be solved with either a max width after which the emote gets scaled down, or blocked from rendering in the extreme cases. looking at other implementations, element seems to use max-width: 800px; to prevent this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions