Unescaped DELETE control character U+007F fails with "unacceptable character"

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

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

評価

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

調査の方向性

Start by reproducing the reported command, python -m openapi_spec_validator --schema 2.0 openapi-spec.json, with both the literal U+007F and its \u007f form. The payload names no source file or test, so trace where parsing rejects the character and whether the dependency is responsible. Done means the expected behavior is implemented and covered for both inputs, or the dependency limitation is clearly documented.

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

説明

Note: I am not entirely sure if the source of this issue lies within the scope of this library of any of its dependencies.

Situation

My (openAPI specification) JSON file contains a string with an unescaped DELETE control character, U+007F.

"examples" : {
              "image/png" : ""  # should be U+007F (Github seems to redact this character)
            },

Output of python -m openapi_spec_validator --schema 2.0 openapi-spec.json is:

unacceptable character #x007f: special characters are not allowed
  in "<urllib response>", position 1082

If we replace the character by its encoded equivalent, like this:

"examples" : {
              "image/png" : "\u007f"
            },

the result is: OK

Expected

In my understanding, RFC 7159 (obsolete) RFC 8259 allows this specific control character to appear escaped and unescaped inside JSON strings: https://tools.ietf.org/html/rfc8259#section-7.

Therefore, I expect OK for both Inputs mentioned above.

主要言語
Python
スター
409
フォーク
73
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

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

python-openapi/openapi-spec-validator のほかの issue

python-openapi/openapi-spec-validator の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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