Browse Source

Mitigated directory traversal in ServeHandler

master
Yessiest 8 months ago
parent
commit
8894a9a55f
  1. 4
      examples/norxondor_gorgonax/config.ru
  2. 13
      examples/norxondor_gorgonax/index.html

4
examples/norxondor_gorgonax/config.ru

@ -13,9 +13,9 @@ app = Hyde::Server.new do
postprocess do |request, response|
puts "Request: #{request}, response: #{response}"
end
index ["index"]
index ["index.html"]
root "#{ENV['PWD']}/assets"
serve "*.(html|css|js)"
serve "/**/*.(html|css|js)"
get "/wormhole/:test/*" do |suffix, test: nil|
<<~RESPONSE
You tried accessing #{suffix} at named param #{test}

13
examples/norxondor_gorgonax/index.html

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title> Cleverly done, mr. freeman </title>
</head>
<body>
<h1>Cleverly done, mr. freeman</h1>
<hr/>
<p>But you are not supposed to be here</p>
<p><b>Get back where you belong.</b></p>
</body>
</html>
Loading…
Cancel
Save