[ci skip] Add more patch identifying comments, merge related patches
This commit is contained in:
@@ -13,13 +13,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
serialized.chatSession = buf.readNullable(RemoteChatSession.Data::read);
|
||||
}, (buf, entry) -> {
|
||||
- buf.writeNullable(entry.chatSession, RemoteChatSession.Data::write);
|
||||
+ // Paper start
|
||||
+ // Paper start - Prevent causing expired keys from impacting new joins
|
||||
+ RemoteChatSession.Data chatSession = entry.chatSession;
|
||||
+ if (chatSession != null && chatSession.profilePublicKey().hasExpired()) {
|
||||
+ chatSession = null;
|
||||
+ }
|
||||
+ buf.writeNullable(chatSession, RemoteChatSession.Data::write);
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent causing expired keys from impacting new joins
|
||||
}),
|
||||
UPDATE_GAME_MODE((serialized, buf) -> {
|
||||
serialized.gameMode = GameType.byId(buf.readVarInt());
|
||||
@@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
private int knownMovePacketCount;
|
||||
@Nullable
|
||||
private RemoteChatSession chatSession;
|
||||
+ private boolean hasLoggedExpiry = false; // Paper
|
||||
+ private boolean hasLoggedExpiry = false; // Paper - Prevent causing expired keys from impacting new joins
|
||||
private SignedMessageChain.Decoder signedMessageDecoder;
|
||||
private final LastSeenMessagesValidator lastSeenMessages = new LastSeenMessagesValidator(20);
|
||||
private final MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault();
|
||||
@@ -39,12 +39,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - Prevent causing expired keys from impacting new joins
|
||||
+ if (!hasLoggedExpiry && this.chatSession != null && this.chatSession.profilePublicKey().data().hasExpired()) {
|
||||
+ LOGGER.info("Player profile key for {} has expired!", this.player.getName().getString());
|
||||
+ hasLoggedExpiry = true;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent causing expired keys from impacting new joins
|
||||
+
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
private void resetPlayerChatState(RemoteChatSession session) {
|
||||
this.chatSession = session;
|
||||
+ this.hasLoggedExpiry = false; // Paper
|
||||
+ this.hasLoggedExpiry = false; // Paper - Prevent causing expired keys from impacting new joins
|
||||
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
|
||||
this.chatMessageChain.append(() -> {
|
||||
this.player.setChatSession(session);
|
||||
|
||||
Reference in New Issue
Block a user