fix: A2App agent-token gate is bypassed by sending any Origin header - #452
Merged
Merged
Conversation
ahmad-ajmal
force-pushed
the
ahmad/a2app-auth-bypass
branch
from
September 21, 2026 14:22
4e59385 to
7bec4b2
Compare
ahmad-ajmal
added this pull request to stack #455
September 22, 2026 06:08
ahmad-ajmal
force-pushed
the
ahmad/a2app-auth-bypass
branch
from
September 22, 2026 09:45
ecda1c0 to
1fd07a8
Compare
korivi-CraftOS
added a commit
that referenced
this pull request
Sep 23, 2026
Replaces killing by port-substring and by process name with a ledger of processes we started, identified by pid + creation time so a recycled pid can never be mistaken for ours. Conflict resolution, app/agent_app/manager.py: #452 moved the tunnel lifecycle out of manager.py into sharing.py, while this branch was fixing the cloudflared reap in manager.py's old copy. Taking either side alone loses something: ours drops the reap fix, theirs resurrects code that no longer belongs here. Resolved by keeping the sharing.py structure and PORTING the fix to where the tunnel now lives: * sharing.py registers each cloudflared it starts in the ledger (ROLE_TUNNEL, pid + start time); * _kill_orphans reaps by that recorded identity instead of running `Stop-Process -Name cloudflared` / `pkill -f cloudflared`, which took down every cloudflared on the machine -- including a tunnel the user runs for their own production work. Without this port the mass-kill would have survived the merge silently, since #452 carried it across into sharing.py untouched. Suite on the merged result: 1257 passed, 0 failed. This also clears the pre-existing failure in tests/test_agent_app_launch_lock.py (TestLiveness::test_a_live_external_app_is_not_dead), which was failing on V1.4.3 before any of these PRs -- the rewritten listener detection fixes it.
korivi-CraftOS
pushed a commit
that referenced
this pull request
Sep 23, 2026
Documentation only: two AGENT.md files (the live agent_file_system copy and the template), version 8 -> 9. Verified the claims against the code on V1.4.3 rather than taking them on trust -- EXCLUSIVE_SOURCES, memory.processing_threshold, _merge_triggers and set_skip_unprocessed_logging all exist and behave as described. The gate was failing on a stale base: the branch was 9 commits behind, so the run was still testing the old validate.ts with its unused verifySystemHashes import, which #452 removed. Updating the branch produced a clean run on all three platforms.
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.
No description provided.