mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Do not add a / to empty path in 'path_traversal'
This commit is contained in:
parent
d823177af6
commit
623aed38b5
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ module Rack
|
|||
class PathTraversal < Base
|
||||
def call(env)
|
||||
path_was = env["PATH_INFO"]
|
||||
env["PATH_INFO"] = cleanup path_was if path_was
|
||||
env["PATH_INFO"] = cleanup path_was if path_was && !path_was.empty?
|
||||
app.call env
|
||||
ensure
|
||||
env["PATH_INFO"] = path_was
|
||||
|
|
Loading…
Reference in a new issue