fix(bot): require Feishu webhook token; split weixin login out of the 800-line file#3779
Merged
Conversation
Follow-up to #3763. - Feishu webhook mode is the default, and verificationTokenValid accepts any caller when no token is configured, so an empty verification_token exposed an unauthenticated event endpoint. Refuse to start webhook mode without a token (fail closed). - Move the weixin account-persistence and QR-login block to weixin_login.go, bringing weixin.go under the 800-line ceiling (811->587).
SuMuxi66
pushed a commit
to SuMuxi66/DeepSeek-Reasonix
that referenced
this pull request
Jun 10, 2026
esengine#3779) Follow-up to esengine#3763. - Feishu webhook mode is the default, and verificationTokenValid accepts any caller when no token is configured, so an empty verification_token exposed an unauthenticated event endpoint. Refuse to start webhook mode without a token (fail closed). - Move the weixin account-persistence and QR-login block to weixin_login.go, bringing weixin.go under the 800-line ceiling (811->587). Co-authored-by: reasonix <reasonix@deepseek.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small hardening + cleanup follow-up to #3763 (bot gateway).
Feishu webhook auth (fail closed). Webhook is the default Feishu mode, and
verificationTokenValidaccepts every caller when no token is set — so an emptyverification_tokenexposed an unauthenticated event endpoint that anyone could use to drive the agent.Startnow refuses webhook mode without averification_tokeninstead of serving it open. The long-connection (WebSocket) mode is unaffected.weixin.go size. Moved the account-persistence + QR-login block (the
savedAccount/LoginResult/LoginSessiontypes andweixinAccountDir…PollLogin) intoweixin_login.go, bringingweixin.gofrom 811 to 587 lines — under the 800-line ceiling. Pure move, same package, no behavior change.go build ./...andgo test ./internal/bot/...pass locally.