Skip to content

Conversation

@booky10
Copy link
Contributor

@booky10 booky10 commented Apr 14, 2025

As of 163a85a, Velocity will attempt to parse all custom payload channels registered/unregistered by clients and kick the client if it appears to be "invalid".
Because of this change, some minor differences between vanilla's ResourceLocation and Velocity's MinecraftChannelIdentifier caused players using certain mods to be kicked on login.

This PR fixes the parsing of MinecraftChannelIdentifier to match vanilla.

@booky10 booky10 force-pushed the fix/minecraft-channel-identifier-parsing branch from e5a1dde to 0101515 Compare April 14, 2025 15:41
@electronicboy
Copy link
Member

electronicboy commented Apr 14, 2025

Thanks, but, I'm generally somewhat iffy on the nature of allowing purely namespace keys, though, I did forget to potentially add skipping of empty strings to mitigate some forge oddities on server switching

@booky10
Copy link
Contributor Author

booky10 commented Apr 14, 2025

Thanks, but, I'm generally somewhat iffy on the nature of allowing purely namespace keys, though, I did forget to potentially add skipping of empty strings to mitigate some forge oddities on server switching

I think the issue you are referring to is forge always appending an extra null byte to their channel-register packet

Ignoring empty channel names in plugin message packets sounds good, but I would still argue that Velocity should try to keep the same logic as vanilla and allow parsing empty strings as MinecraftChannelIdentifier for as long as vanilla allows this too

@astei astei merged commit 3f0a85d into PaperMC:dev/3.0.0 Apr 14, 2025
1 check passed
TheMiningTeamYT added a commit to TheMiningTeamYT/Velocity that referenced this pull request Sep 1, 2025
* preliminary cleanup of plugin message channel handling

* Fix spot

* Appease checkstyle

* Fix tests

* Add more options for ping passthrough configuration. (Merge ping-passthrough-dev)

* Added 'ALLBUTVERSION' option for ping passthrough.

* Trying to get the GitHub build action to run

* Added more configuration options for ping passthrough.

* Updated default velocity.toml

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Add support for the legacy ping passthrough.

---------

Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>

* Use an ImmutableList Builder

* Appease checkstyle gods

* Also validate length before caring to invest time into processing

* Fix MinecraftChannelIdentifier parsing to align with vanilla (PaperMC#1552)

* Removed legacy ping passthrough & added config migration

- Bumped config-version to 2.8
- Updated comments and grammar
- Removed legacy ping passthrough in the config

* Cleaned up code to match code style

---------

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Loganius <31364192+TheMiningTeamYT@users.noreply.github.com>
Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>
Co-authored-by: booky <boooky10@gmail.com>
TheMiningTeamYT added a commit to TheMiningTeamYT/Velocity that referenced this pull request Oct 18, 2025
* Added 'ALLBUTVERSION' option for ping passthrough.

* Trying to get the GitHub build action to run

* Added more configuration options for ping passthrough.

* Updated default velocity.toml

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Add support for the legacy ping passthrough.

* Added config migration for new values and removed legacy value

* preliminary cleanup of plugin message channel handling

* Fix spot

* Appease checkstyle

* Fix tests

* Add more options for ping passthrough configuration. (Merge ping-passthrough-dev)

* Added 'ALLBUTVERSION' option for ping passthrough.

* Trying to get the GitHub build action to run

* Added more configuration options for ping passthrough.

* Updated default velocity.toml

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Add support for the legacy ping passthrough.

---------

Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>

* Use an ImmutableList Builder

* Appease checkstyle gods

* Also validate length before caring to invest time into processing

* Fix MinecraftChannelIdentifier parsing to align with vanilla (PaperMC#1552)

* Removed legacy ping passthrough & added config migration

- Bumped config-version to 2.8
- Updated comments and grammar
- Removed legacy ping passthrough in the config

* Cleaned up code to match code style

---------

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Loganius <31364192+TheMiningTeamYT@users.noreply.github.com>
Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>
Co-authored-by: booky <boooky10@gmail.com>

* Revert "Merge branch 'dev/3.0.0' into ping-passthrough-dev"

This reverts commit 4a32358, reversing
changes made to 2c41819.

---------

Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>
Co-authored-by: ButterDebugger <34288129+ButterDebugger@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: booky <boooky10@gmail.com>
TheMiningTeamYT added a commit to TheMiningTeamYT/Velocity that referenced this pull request Oct 18, 2025
* Added 'ALLBUTVERSION' option for ping passthrough.

* Trying to get the GitHub build action to run

* Added more configuration options for ping passthrough.

* Updated default velocity.toml

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Add support for the legacy ping passthrough.

* Added config migration for new values and removed legacy value

* preliminary cleanup of plugin message channel handling

* Fix spot

* Appease checkstyle

* Fix tests

* Add more options for ping passthrough configuration. (Merge ping-passthrough-dev)

* Added 'ALLBUTVERSION' option for ping passthrough.

* Trying to get the GitHub build action to run

* Added more configuration options for ping passthrough.

* Updated default velocity.toml

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Update proxy/src/main/java/com/velocitypowered/proxy/connection/util/ServerListPingHandler.java

Co-authored-by: powercas_gamer <cas@mizule.dev>

* Add support for the legacy ping passthrough.

---------

Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>

* Use an ImmutableList Builder

* Appease checkstyle gods

* Also validate length before caring to invest time into processing

* Fix MinecraftChannelIdentifier parsing to align with vanilla (PaperMC#1552)

* Removed legacy ping passthrough & added config migration

- Bumped config-version to 2.8
- Updated comments and grammar
- Removed legacy ping passthrough in the config

* Cleaned up code to match code style

---------

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Loganius <31364192+TheMiningTeamYT@users.noreply.github.com>
Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>
Co-authored-by: booky <boooky10@gmail.com>

---------

Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: powercas_gamer <cas@mizule.dev>
Co-authored-by: ButterDebugger <34288129+ButterDebugger@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: booky <boooky10@gmail.com>
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

Successfully merging this pull request may close these issues.

3 participants