Skip to content

fix: OpenClaw ports — weak credential guard + Matrix m.mentions - #8706

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-86c78845
Apr 13, 2026
Merged

fix: OpenClaw ports — weak credential guard + Matrix m.mentions#8706
teknium1 merged 2 commits into
mainfrom
hermes/hermes-86c78845

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Two OpenClaw ports cherry-picked onto current main:

1. Reject weak placeholder credentials at startup (from #8677, openclaw#64586)

  • Extracts _validate_gateway_config() for testability
  • Checks enabled platform tokens against has_usable_secret() — disables platforms with placeholder values (***, changeme, etc.) with a clear error
  • Rejects placeholder API_SERVER_KEY when binding to network-accessible addresses

2. Trust m.mentions.user_ids as authoritative mention signal (from #8673, openclaw#64796)

  • Per MSC3952 / Matrix v1.7, m.mentions.user_ids is the spec-defined mention signal
  • Clients that set m.mentions but don't duplicate @bot in body text were silently dropped
  • Text-based fallback remains for older clients

Tests

54 tests pass (test_matrix_mention.py + test_weak_credential_guard.py)

Closes #8677, closes #8673

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.
@teknium1
teknium1 merged commit f724079 into main Apr 13, 2026
@teknium1
teknium1 deleted the hermes/hermes-86c78845 branch April 13, 2026 01:05
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