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

Add image element #23

Open
Trigary opened this issue Jan 27, 2020 · 0 comments
Open

Add image element #23

Trigary opened this issue Jan 27, 2020 · 0 comments

Comments

@Trigary
Copy link
Owner

Trigary commented Jan 27, 2020

Add an element that can display an image that is not present in vanilla Minecraft, nor in any of the loaded resource packs. This element existed up to commit dd4b373, but was removed due to the packet length limit (which is roughly 32 KB).

A simple solution would be to send a URL that can supply the image, instead of sending the image itself. I am against this solution because I don't want to allow servers to make clients query 3rd party websites. The in-game chat has manual link opening confirmation for a reason.

It would seem that the only solution that's left is to implement a secondary data transmission form (a 2nd socket or custom packet reassembly on top of the plugin messaging channel). That is a lot of codebase to maintain for such a small feature, therefore I am not fond of this idea either.

A real solution might be to only allow specific URLs, or more specifically, only allow Imgur image IDs to be transmitted and construct the real URL client-side. I currently see no security risk in this (if someone can hijack your HTTPS traffic to Imgur you have bigger issues).

Whatever the case, if the image data doesn't get received together with the rest of the GUI data, it must be displayed asynchronously, aka not at the same time, but sometime in the future. This in itself causes a lot of complications. Whether to add this feature or not should be carefully considered.

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

No branches or pull requests

1 participant