Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ultinate opened this issue Jan 27, 2020 · 0 comments

Comments

@ultinate
Copy link

ultinate commented Jan 27, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant