Skip to content

Commit

Permalink
Double decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
GarrettVD committed Nov 6, 2018
1 parent 2a3aa4d commit cd81893
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cve_server/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class App < Sinatra::Base

get '/v1/cpe/:cpe_str' do |cpe_str|
if params.has_key?('double_encoded_fields') && params['double_encoded_fields']
cpe_str = URI.decode(cpe_str)
cpe_str = URI.decode(URI.decode(cpe_str))
end
# Multiple cpes were included
if cpe_str.include?(",")
Expand All @@ -47,7 +47,7 @@ class App < Sinatra::Base

get '/v1/cpe_with_version/:cpe_str' do |cpe_str|
if params.has_key?('double_encoded_fields') && params['double_encoded_fields']
cpe_str = URI.decode(cpe_str)
cpe_str = URI.decode(URI.decode(cpe_str))
end
# Multiple cpes were included
if cpe_str.include?(",")
Expand Down

0 comments on commit cd81893

Please sign in to comment.