GithubHelp home page GithubHelp logo

Comments (7)

rkh avatar rkh commented on June 9, 2024

This would be possible if the request Content-Type is set properly, I guess. Unless we start parsing XML though, this would not have prevented the attack on rails and even then not the one on RubyGems.org. I haven't seen many APIs that support posting YAML to it directly, tbh.

from rack-protection.

brynary avatar brynary commented on June 9, 2024

Could we be more general and just grep the entire request-as-a-string? It could be hidden in a header value, for example.

This would be a defense-in-depth measure against another vulnerability deeper in the stack, and also an early warning tripwire if you are under attack.

from rack-protection.

rkh avatar rkh commented on June 9, 2024

So block anything that contains the string !ruby?

from rack-protection.

brynary avatar brynary commented on June 9, 2024

"--- !ruby" maybe

On Thu, Jan 31, 2013 at 4:31 PM, Konstantin Haase
[email protected]:

So block anything that contains the string !ruby?


Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-12967001.

from rack-protection.

rkh avatar rkh commented on June 9, 2024

No, that won't do it. You can place the object in an array or hash.

from rack-protection.

brynary avatar brynary commented on June 9, 2024

Ah, yeah then I think it would have to be "!ruby"

On Thu, Jan 31, 2013 at 4:59 PM, Konstantin Haase
[email protected]:

No, that won't do it. You can place the object in an array or hash.


Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-12968277.

from rack-protection.

mkristian avatar mkristian commented on June 9, 2024

I think the best way to protect you application from "unsafe" yaml is adding https://github.com/dtao/safe_yaml to your project. what about XML and JSON - do your parsers for this allow object instantiation like yaml ?

just my 2 cents . . .

from rack-protection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.