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

Chat encryption happening too early for client side mods #385

Open
wagyourtail opened this issue Apr 1, 2023 · 3 comments
Open

Chat encryption happening too early for client side mods #385

wagyourtail opened this issue Apr 1, 2023 · 3 comments
Assignees
Labels
3rd party issue The issue is not related to this mod alone bug Something isn't working confirmed Confirmed bug/approved suggestion

Comments

@wagyourtail
Copy link

Modloader

Fabric

Minecraft Version

1.19.4

Modloader Version

No Chat Reports Version

1.19.4-v2.1.1

Modpack Info

No response

The latest.log File

N/A

Bug Description

NCR encrypts messages too early in the process for most client-side mods to handle properly.

This is fixable by injecting into the chat message s2c/c2s packets initializers and doing the encryption there instead

Steps to Reproduce

  1. enable encryption
  2. have baritone
  3. try to use baritone

Other Information

cabaletta/baritone#3894

looks like meteor also injects at the same spot https://github.com/MeteorDevelopment/meteor-client/blob/03d17cd4a6d5f8102cdbe2c5f2ed9cebc8b80b10/src/main/java/meteordevelopment/meteorclient/mixin/ClientPlayNetworkHandlerMixin.java#L130

also some mods such as jsmacros will end up bypassing the encryption by sending at that lower level;
https://github.com/JsMacros/JsMacros/blob/274c80c0d817276733a3d05ef20a477ec228f2af/common/src/main/java/xyz/wagyourtail/jsmacros/client/api/library/impl/FChat.java#L154

I'm sure there are many other mods like this

I suggest moving the encryption/decryption to happen when the packet classes are constructed in order to be compatible with most if not all client mods

@wagyourtail wagyourtail added the bug Something isn't working label Apr 1, 2023
@Aizistral Aizistral added confirmed Confirmed bug/approved suggestion 3rd party issue The issue is not related to this mod alone labels May 17, 2023
@Aizistral
Copy link
Member

Aizistral commented May 17, 2023

I have decided against fixing this in 1.19. Changing injection point for encryption can potentially lead to other issues, and since I do not plan to release 1.19 updates after 1.20 is released, I will do this after porting to 1.20, where I will be able to address them as part of ongoing maintenance.

@IlyaYezelovsky
Copy link
Contributor

IT ALSO APPEARS ON FORGE 1.20.1 WITH BARITONE MOD!

@pointydev
Copy link

It would be nice if this issue could be resolved, as having to toggle encryption manually to run Baritone commands is rather tedious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party issue The issue is not related to this mod alone bug Something isn't working confirmed Confirmed bug/approved suggestion
Projects
None yet
Development

No branches or pull requests

4 participants