Skip to content
Permalink
Browse files Browse the repository at this point in the history
escape invalid query params, fixes #1428
  • Loading branch information
namusyaka committed May 30, 2018
1 parent 5149dc9 commit 1278686
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Expand Up @@ -78,7 +78,7 @@ def unlink?
def params
super
rescue Rack::Utils::ParameterTypeError, Rack::Utils::InvalidParameterError => e
raise BadRequest, "Invalid query parameters: #{e.message}"
raise BadRequest, "Invalid query parameters: #{Rack::Utils.escape_html(e.message)}"
end

private
Expand Down

0 comments on commit 1278686

Please sign in to comment.