Rich text stores and delivers javascript: link hrefs

オープン 初心者向け
#3,269 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
security

調査の方向性

src/FluentCMS.Core/RichText/RichTextParser.cs の CheckMarkAttributes 周辺(388~394 行)を読み、HTML および Markdown レンダラーにおける既存の SafeUrl.IsSafe の動作を確認してください。書き込み検証境界で、安全でない URL と受け入れられる URL のテストを追加してください。安全でない href が mark のパスで 422 を返し、安全な URL、相対 URL、mailto: URL は引き続き通る状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

area:content security type:bug

Problem

RichTextParser.CheckMarkAttributes (src/FluentCMS.Core/RichText/RichTextParser.cs:388-394) checks only that a link's href is a string. SafeUrl runs in the HTML and Markdown renderers, but JSON, the default format, stores and returns javascript:alert(1) as is. A front end that renders the ProseMirror JSON itself gets stored XSS from any editor account.

Proposal

Run SafeUrl.IsSafe on write and report a validation error at the mark's path; consider cleaning existing data on read.

Acceptance

  • A write with an unsafe href answers 422 at the mark's path
  • Safe URLs, relative links and mailto: still pass

Found in the code review of 17 Nov 2026 (S3).

主要言語
C#
スター
569
フォーク
107
平均マージ
2時間 49分
マージ済み PR(30日)
397

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fluentcms/FluentCMS のほかの issue

fluentcms/FluentCMS の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。