fix: OpenClaw ports — weak credential guard + Matrix m.mentions - #8706
Merged
Conversation
Port from openclaw/openclaw#64796: Per MSC3952 / Matrix v1.7, the m.mentions.user_ids field is the authoritative mention signal. Clients that populate m.mentions but don't duplicate @bot in the body text were being silently dropped when MATRIX_REQUIRE_MENTION=true. Cherry-picked from PR #8673.
Port from openclaw/openclaw#64586: users who copy .env.example without changing placeholder values now get a clear error at startup instead of a confusing auth failure from the platform API. Also rejects placeholder API_SERVER_KEY when binding to a network-accessible address. Cherry-picked from PR #8677.
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.
Summary
Two OpenClaw ports cherry-picked onto current main:
1. Reject weak placeholder credentials at startup (from #8677, openclaw#64586)
_validate_gateway_config()for testabilityhas_usable_secret()— disables platforms with placeholder values (***,changeme, etc.) with a clear errorAPI_SERVER_KEYwhen binding to network-accessible addresses2. Trust m.mentions.user_ids as authoritative mention signal (from #8673, openclaw#64796)
m.mentions.user_idsis the spec-defined mention signalTests
54 tests pass (test_matrix_mention.py + test_weak_credential_guard.py)
Closes #8677, closes #8673