Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Long URL in an issue/PR body is stored wrapped in a code span, breaking the link

未關閉
#3,299 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
52/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
go
領域
api, backend

研究方向

Start at the issue_write and update_pull_request entry points, then trace the body-filtering path implicated by the report and compare fresh writes at 103 and 104 characters. Reproduce the markdown link, bare URL, and autolink cases from the issue. Done means long URLs are stored verbatim and render as working links for both write tools.

由索引模型根據 Issue 內容生成。

描述

A URL of 104 characters or more, written into an issue body or pull request description through the MCP, is stored wrapped in a double-backtick code span. At 103 characters and below it stores verbatim.

The link is then broken on GitHub itself, not only in a read-back through the server — the rendered page shows a code span where the link should be.

Reproduction

Write a body containing a markdown link whose destination is 104 characters or longer, then read the stored body back through the REST API, so that the read path is not part of the picture.

Sent:

[link](https://example.com/T104-0123456789012345678901234567890123456789012345678901234567890123456789012345678)

Stored:

[link](``https://example.com/T104-0123456789012345678901234567890123456789012345678901234567890123456789012345678``)

The same URL one character shorter stores untouched:

[link](https://example.com/T104-012345678901234567890123456789012345678901234567890123456789012345678901234567)

What I varied

Stepping the length by twos, then by ones across the boundary (reproduction):

Variable Result
Length 104 is the boundary — 96, 98, 100, 101, 102 and 103 store clean; 104, 106, 108, 128, 148, 168 and 188 all wrapped
Host Irrelevant — example.com at 184 wraps exactly as docs.github.com does, and short non-GitHub URLs are untouched
Construct Irrelevant — markdown link destination, bare URL and autolink all wrap; an autolink's < and > are additionally escaped to entities
Write tool Both — issue_write and update_pull_request behave alike

Where the closing backticks land varies with length: inside the link's parentheses around 104 to 130, and outside them, swallowing the ), from about 148 up.

One consequence worth noting: because the behaviour applies to a bare URL as well as a link destination, an MCP client cannot post this report with a working example in it — the example is corrupted by the behaviour being reported. This body was pasted by hand for that reason.

Not the same as #3165

That one is a read-modify-write persisting a lossy read, and states that a fresh write does not trigger it. Here the body is composed fresh and never read first, and there is a clear length threshold, neither of which that issue describes.

It may be a side effect of the newer body-filtering work (#3035, #3177) preserving a long token by wrapping it rather than deleting it, but I have not verified that and cannot tell which server version served these calls.

Observed 2026-09-17 through the remote MCP endpoint, driven from Claude Code.

主要語言
Go
星號
33.1k
分支
5k
平均合併
2 天 3 小時
30 天內合併 PR
18

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/github-mcp-server 的其他 Issue

查看 github/github-mcp-server 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。