Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
BuffaloWill committed May 4, 2023
1 parent 5ab3dce commit 75745d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def replace_file(params)
# xml_file (required):

if params[:file] == nil
return StandardError, "Error no file included"
raise StandardError, "Error no file included"
end

pl = read_payloads()
Expand Down
22 changes: 10 additions & 12 deletions server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,17 @@
end

post '/replace' do
if fn == "|-|"
"|-| Could not find § in document, please verify."
else
# write entry to database
x = Oxfile.new
x.filename = fn.split('/').last
x.location = fn
x.desc = clean_html(params["desc"])
x.type = fn.split('.').last
x.save
fn = replace_file(params)

send_file(fn, :filename => "#{fn.split('/').last}")
end
# write entry to database
x = Oxfile.new
x.filename = fn.split('/').last
x.location = fn
x.desc = clean_html(params["desc"])
x.type = fn.split('.').last
x.save

send_file(fn, :filename => "#{fn.split('/').last}")
end

get '/xss' do
Expand Down

0 comments on commit 75745d4

Please sign in to comment.