Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

More XSS's in safe mode

オープン
#726 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
security

調査の方向性

まず、HTML エンティティと不正なリンク/画像構文に対するセーフモードの処理を追跡し、issue にある 2 つの Markdown 入力を参照先の commit に対して再現します。両方のケースが、実行可能なプロトコルや生のイベントハンドラーマークアップなしで安全な HTML としてレンダリングされれば完了です。

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

説明

Describe the bug

After the patches of #722, I manually found a simple bypass of the HTML entity regex, and ran the fuzzer again to find another HTML corruption.

To Reproduce

  1. The browser decodes &#058 to : forming a javascript: protocol URL (entities can be prefixed with any amount of 0's).
[Click me](javascript&#058alert(origin))
<p><a href="javascript&#058alert(origin)">Click me</a></p>
  1. Weird combination of syntax again resulting in raw HTML being output:
<x![](`<a
>`)><svg onload=alert(origin)![](`<a
>`)
<p>&lt;x<img src="code&gt;&lt;a
&gt;&lt;/code" alt="" />&gt;<svg onload=alert(origin)<img src="code&gt;&lt;a
&gt;&lt;/code" alt="" /></p>

Expected behavior

Safe HTML is output. Maybe use a proper HTML entity decoder to solve the first.

Debug info
Version of library being used: https://github.com/trentm/python-markdown2/commit/ba92f30e9101f485bfd6b2a3178908ee4a82da9f (latest master at time of writing)

主要言語
Python
スター
2.8k
フォーク
459
平均マージ
2日 19時間
マージ済み PR(30日)
4

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

trentm/python-markdown2 のほかの issue

trentm/python-markdown2 の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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