fix(acp): reject unadvertised auth methods - #13533
Closed
zhao0112 wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Likely duplicate of #13468 (merged) — same fix validating method_id against the advertised provider in ACP authenticate(). |
1 similar comment
Collaborator
|
Likely duplicate of #13468 (merged) — same fix validating method_id against the advertised provider in ACP authenticate(). |
Contributor
|
Thanks for the contribution @zhao0112! This fix was already shipped in #13468 (merged 2026-04-21), which applies the same correction — This is an automated hermes-sweeper review. Evidence:
Closing as duplicate — the underlying issue (#13452) is resolved. |
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
method_idagainst the runtime provider advertised during ACP initializationmethod_idFixes #13452
Root Cause
HermesACPAgent.initialize()advertises a single auth method derived fromdetect_provider(), butauthenticate()previously ignored the requestedmethod_idand returned success whenever any provider was configured. That allowed clients to authenticate with method ids the server never advertised.Validation
PYTHONPATH=/Users/zzl/.hermes/hermes-agent-pr-13452 /Users/zzl/.hermes/hermes-agent-update-20260421/venv/bin/python -m pytest -o addopts= tests/acp/test_server.py -qPYTHONPATH=/Users/zzl/.hermes/hermes-agent-pr-13452 /Users/zzl/.hermes/hermes-agent-update-20260421/venv/bin/python -m py_compile acp_adapter/server.py tests/acp/test_server.pygit diff --check