Builder emits forbidden XML control characters and validator accepts them
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, xml
調査の方向性
Start with the XML builder and validator entry points in the fast-xml-parser source, where text values are escaped before output; the repro in the issue calls XMLBuilder().build and XMLValidator.validate on { a: "\u0000" }. Check whether the builder's text handling and the validator's character checks cover the XML 1.0 forbidden range U+0000-U+0008, U+000B, U+000C, U+000E-U+001F. Done when the builder no longer emits these code points and XMLValidator.validate rejects text containing them, with tests for U+0000 and U+0001.
索引モデルが issue の本文から書いたものです。
説明
- Are you running the latest version? (
5.11.2,masteratcf66a9658004553bc740616e6c7a4912e7e9aab6) - Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration? (default builder, validator, and parser options)
- Did you try the online tool? (it reports
Valid XMLfor the standalone NUL sample) - Have you checked the docs for helpful APIs and examples?
Description
The builder emits U+0000 and U+0001 verbatim, and the validator accepts the resulting text as valid XML. XML 1.0 Character Range excludes both code points. This can produce documents that a conforming XML reader cannot consume.
Input
{ a: "\u0000" } (the JavaScript string contains an actual NUL after escape processing). U+0001 behaves the same. U+0009 and U+000A are valid controls.
Code
const { XMLBuilder, XMLValidator, XMLParser } = require("./lib/fxp.cjs");
const xml = new XMLBuilder().build({ a: "\u0000" });
console.log(JSON.stringify(xml));
console.log(XMLValidator.validate(xml));
console.log(JSON.stringify(new XMLParser().parse(xml, true)));
Output
"<a>\u0000</a>"
true
{"a":"\u0000"}
Expected data
The builder should avoid emitting forbidden XML characters, and the validator should reject XML text containing U+0000 or U+0001.
Would you like to work on this issue?
- Yes
- No
- 主要言語
- JavaScript
- スター
- 3.1k
- フォーク
- 410
- 平均マージ
- 4日 15時間
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NaturalIntelligence/fast-xml-parser のほかの issue
-
A processing instruction with no target passes validation, then the builder prints invalid XML対応中かも @bardrop が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NaturalIntelligence/fast-xml-parser#927 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
XMLValidator accepts double hyphens inside comments対応中かも @Sskift が 16 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NaturalIntelligence/fast-xml-parser#903 · コメント 3 件 ·
メンテナーはふだん 4 日以内に返信
-
XMLValidator accepts raw < and & in attribute values対応中かも @jeromeyyy が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NaturalIntelligence/fast-xml-parser#900 · コメント 3 件 ·
メンテナーはふだん 4 日以内に返信
-
getMetaDataSymbol() declares a boxed Symbol対応中かも @chiragbitoni が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NaturalIntelligence/fast-xml-parser#890 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NaturalIntelligence/fast-xml-parser#888 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
NaturalIntelligence/fast-xml-parser の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
Extended search drops any query term that contains a line break対応中かも @goranai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信