fix: update ZIP EOCD comment_length when signing MCPB files (#194) · modelcontextprotocol/mcpb@bb676eb · GitHub
Skip to content

Commit bb676eb

Browse files
fix: update ZIP EOCD comment_length when signing MCPB files (#194)
The signMcpbFile function appended a signature block to the ZIP file but did not update the EOCD comment_length field. Strict ZIP parsers (like Claude Desktop's) rejected these files because the declared comment length didn't account for the appended signature data. Now scans backwards for the EOCD magic bytes, reads the current comment_length, and adds the signature block length before concatenating. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1dca91e commit bb676eb

2 files changed

Lines changed: 73 additions & 1 deletion

File tree

‎src/node/sign.ts‎

Lines changed: 27 additions & 1 deletion

‎test/sign.e2e.test.ts‎

Lines changed: 46 additions & 0 deletions

0 commit comments

Comments
 (0)