Skip to content

Refuse private AI targets and add a real OCR smoke - #8

Open
DNTOF wants to merge 4 commits into
mainfrom
cursor/ssrf-ocr-gate-0e28
Open

DNTOF wants to merge 4 commits into
mainfrom
cursor/ssrf-ocr-gate-0e28

Conversation

@DNTOF

@DNTOF DNTOF commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

拒绝私网和元数据地址上的 AI 转发,开发服务默认只听本机,API 密钥不再写入 localStorage。全量测试增加一次真实 CoMER 读取;样例是合成折线,不是手写准确率。

The AI proxy refuses private and metadata addresses. The dev server listens on loopback unless sharing is explicit, and API keys are not written to localStorage. The full test path runs one real CoMER reading. The strokes are synthetic polylines, not a handwriting accuracy claim.

这次提交没有本机签名。v0.0.1 的 tag 和 Release 没有改。

This commit is not signed on the local machine. The v0.0.1 tag and Release are unchanged.

DNTOF and others added 4 commits November 8, 2026 01:09
The dev proxy checks literal and resolved addresses, including IPv4-mapped IPv6, and the dev server listens on loopback unless sharing is explicit. API keys are not kept in localStorage. A real CoMER smoke reads two synthetic formulas and fails if the model files are missing.

Co-authored-by: DNT_OF <allowcache@gmail.com>
Private and loopback targets now require an exact origin in
MATHSCRAP_AI_LOCAL_ORIGINS. Link-local stays blocked. The bridge
rejects foreign origins, a rebound Host, and websocket upgrades,
and no longer accepts a LAN share token. Real OCR smoke pins the
model hashes and records the synthetic readings.

Co-authored-by: DNT_OF <allowcache@gmail.com>
Chrome omits Origin on same-origin GET. Those health and wait polls
now pass only with Sec-Fetch-Site: same-origin. A POST still needs a
matching loopback Origin, and a bare GET is still refused.

Co-authored-by: DNT_OF <allowcache@gmail.com>
Header spoofing no longer authorizes bridge or proxy calls. The
browser cookie is set on document navigation, and the stdio client
reads a mode 0600 file. Embedded IPv4 forms stay blocked, and the
formula gate treats a short or two-line note as text.

Co-authored-by: DNT_OF <allowcache@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant