Skip to content

Fix incompatibility by skipping offine encrypt instead of kick#1365

Open
Lumine1909 wants to merge 1 commit into
TuxCoding:mainfrom
Lumine1909:dev
Open

Fix incompatibility by skipping offine encrypt instead of kick#1365
Lumine1909 wants to merge 1 commit into
TuxCoding:mainfrom
Lumine1909:dev

Conversation

@Lumine1909

@Lumine1909 Lumine1909 commented Jul 20, 2026

Copy link
Copy Markdown

Summary of your change

Do not kick player when processing encryption on offline players, so the later netty handler can work correctly.

Motivation

I'm currently maintaining a plugin that enable encryption on offline players, and it is incompatible with FastLogin on both online and offline players. I added a fix in my plugin that resolved online player encrypted twice. But currently FastLogin kick the offline player due to exception when processing encryption related packet, since their verifyToken is a empty array.

I added a check for offline player when doing encryption, so that my plugin can process the encrypt response packet later : )

Related pr

Lumine1909/OfflineEncryptor#6

Summary by CodeRabbit

  • Bug Fixes
    • Improved login handling for offline players by skipping unnecessary encryption-token verification.
    • Preserved existing behavior for invalid login sessions, including session rejection.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: edde2ce0-25cc-4258-acdd-8444b15513a5

📥 Commits

Reviewing files that changed from the base of the PR and between 9486138 and 3c22946.

📒 Files selected for processing (1)
  • bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java
📜 Recent review details
🔇 Additional comments (1)
bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/ProtocolLibListener.java (1)

181-193: LGTM!


📝 Walkthrough

Walkthrough

onEncryptionBegin now skips nonce verification when a Bukkit login session has an empty verify token, while preserving the existing verification flow for non-empty tokens and invalid-session kick behavior.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: skipping offline encryption handling to avoid kicking players.
Description check ✅ Passed The description covers the change, motivation, and related work, but it omits the template's requested related issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant