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

ArgumentError (invalid byte sequence in UTF-8) #736

Closed
aussiDavid opened this issue Jan 19, 2022 · 0 comments
Closed

ArgumentError (invalid byte sequence in UTF-8) #736

aussiDavid opened this issue Jan 19, 2022 · 0 comments

Comments

@aussiDavid
Copy link
Contributor

When sending a request that contains a non-UTF-8 character raises ArgumentError.

To recreate the issue:

  1. Install apipie in a rails application
  2. Start rails
  3. Run this request in the browser http://localhost:3000/%B8

Partial Backtrace:

apipie-rails (0.5.19) lib/apipie/static_dispatcher.rb:12:in `gsub'
apipie-rails (0.5.19) lib/apipie/static_dispatcher.rb:12:in `match?'
apipie-rails (0.5.19) lib/apipie/static_dispatcher.rb:60:in `call'
apipie-rails (0.5.19) lib/apipie/extractor/recorder.rb:137:in `call'
rack (2.2.3) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.2.3) lib/rack/etag.rb:27:in `call'
rack (2.2.3) lib/rack/conditional_get.rb:27:in `call'
rack (2.2.3) lib/rack/head.rb:12:in `call'
.
.
.

It appears the issue is in attempting to apply a regex on a non-UTF-8 string in the static_dispatcher.rb file.

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

2 participants