-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sinatra or sinatra-contrib has to do path traversal prevention #310
Comments
@sr, @bmizerany, @rtomayko opinions? also, directory traversal seems to be the most common attack. |
As an aside: If you're calling I'd favour sinatra depending on it, or VERY clear warnings about this in the readme. |
There is a third option: Basically copying the path traversal code from rack-protection into Sinatra. |
I added this to sinatra-contrib for now, but (esp. after a discussion with Sinatra users at Rocky Mountain Ruby) tend to actually include it into Sinatra proper. |
People really do what about people that like to: |
@jacobo: I will disable |
Don't escape parameters by default in included rack-protection (issue #310)
Sinatra 1.3 will follow RFC 2616 for matching patterns to URLs. This introduces a path traversal vulnerability in all applications that use params directly in rendering methods (like
erb(params[:template].to_sym)
). A counter measure is implemented in rack-protection. I think either Sinatra or sinatra-contrib should depend on it. I would favor sinatra-contrib, but that means we can't release Sinatra 1.3 until we finish sinatra-contrib.The text was updated successfully, but these errors were encountered: