mirror of
https://github.com/devnullvoid/mcp-ssh-session.git
synced 2026-04-26 22:15:51 +03:00
[PR #2] [MERGED] Fix exit codes, shell escaping, validation, and logging #3
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mcp-ssh-session#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/devnullvoid/mcp-ssh-session/pull/2
Author: @google-labs-jules[bot]
Created: 12/5/2025
Status: ✅ Merged
Merged: 12/5/2025
Merged by: @devnullvoid
Base:
main← Head:ssh-session-improvements📝 Commits (1)
d15ef5dFix SSH session issues and improve logging📊 Changes
3 files changed (+122 additions, -15 deletions)
View changed files
📝
mcp_ssh_session/command_executor.py(+87 -5)📝
mcp_ssh_session/file_manager.py(+12 -6)📝
mcp_ssh_session/session_manager.py(+23 -4)📄 Description
This PR addresses several critical issues and improvements identified in
docs/CODE_REVIEW.md:echo $?or equivalent) for commands that complete during background monitoring after a timeout. This ensuresexit_codeis accurate instead of defaulting to 0 or None.write_file(sudo mode) withbase64encoding/decoding. This prevents vulnerabilities and bugs related to special characters (newlines, quotes, etc.) in file content._execute_enable_mode_command_internalto check if the session is actually in enable mode (prompt ends with#) before executing commands. It attempts to re-enter enable mode if the validation fails.recvloops incommand_executor.pyto prevent log flooding during long operations or idle states.Verified with targeted reproduction tests and existing regression tests.
PR created automatically by Jules for task 11506711411728051988 started by @devnullvoid
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.