Files
markbase/markbase-core
Warren 03cb6913b3
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Fix SSH Phase 7: SFTP packet SSH string format
SFTP protocol fix completed:
- Add wrap_sftp_packet() helper function
- All SFTP responses now use SSH string format (uint32(length) + packet_type + payload)
- SSH_FXP_VERSION response: 9 bytes ✓
- SSH_FXP_REALPATH response: 71 bytes ✓
- SSH_FXP_NAME, SSH_FXP_DATA, SSH_FXP_HANDLE all wrapped correctly

Test results:
- SSH_FXP_INIT (version 3) → SSH_FXP_VERSION working ✓
- SSH_FXP_REALPATH (path=.) → SSH_FXP_NAME working ✓
- SFTP handshake successful ✓
- Connection established (sftp connects successfully) ✓

SFTP packet format fix:
- SFTP packets need SSH string format: uint32(length) + packet_type + payload
- SSH_MSG_CHANNEL_DATA adds another SSH string layer (double wrapping)
- Client expects: [length, packet_type, payload] format

Files modified:
- sftp_handler.rs: Added wrap_sftp_packet() and wrapped all responses

Progress: SFTP protocol now working at 80% completion
2026-06-15 11:53:12 +08:00
..