Repository navigation
fix(plugins): etherscan-autolink / web-search の ### メタデータから https:// を除く - #100
Merged
Merged
Conversation
…を除く (NoteDeck の解析で // 以降が消えて Plugin:config が空になる) NoteDeck の parseMetaBlock は ### ブロック全体に行コメント除去を当ててから JSON を読むので、 description / label / default の文字列中の `https://` でも行末まで消えて JSON が壊れ、行単位の fallback に落ちて config がオブジェクトにならない。結果 Plugin:config が空になり、設定値を `.trim()` などで触った時点で "Cannot read prop of null" で落ちる。 - etherscan-autolink 1.0.1: default を `etherscan.io` (ホストのみ) にし、explorerBase() で スキーム無しなら `https://` を補う。空文字は既定に戻す - web-search 1.0.1: label の例から `https://` を除き、searxngUrl にスキームが無ければ補う NoteDeck と同じ手順で ### を解析して default から Plugin:config を組む検証 9 件で確認 (explorerBase 未設定 / ホストのみ / https / 空 / http / null、searxngUrl ホストのみ / https / 未設定)。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題
NoteDeck の
parseMetaBlock(src/aiscript/plugin-api.ts) は###ブロック全体に行コメント除去 (/\/\/[^\n]*/g) を当ててから JSON として読む。文字列の中でも//以降が消えるため、description / label / default に書いたhttps://で JSON が壊れて行単位の fallback 解析に落ち、configがオブジェクトにならない。結果Plugin:configが空になり、設定値を.trim()などで触った時点でCannot read prop of nullで落ちる。AiScript 本来の
collectMetadataを使う check-registry-integrity / contract:verify では通ってしまうので、NoteDeck に入れて初めて気付く。NoteDeck の解析を写したスクリプトで全 44 プラグインを調べ、壊れるのはこの 2 つ (と別 PR で出す mfm-search-engine) だった。変更
https://を除き、default をetherscan.ioに。explorerBase()でスキーム無しならhttps://を補い、空文字は既定に戻すsearx.example.comに。searxngUrlにスキームが無ければhttps://を補う検証
NoteDeck と同じ手順で
###を解析して default からPlugin:configを組み、Interpreter で実行:basescan.org/https://arbiscan.io// 空 /http://evil.example/ null → 期待どおりの URL (http と不正値は既定に戻る)searx.example.com/https://searx.example.com/→https://searx.example.com/search?q=…、未設定は toastNoteDeck 側の根本原因は別途 issue。
🤖 Generated with Claude Code