News for hackers. Stuff that matters.
Re:CVE-2019-5418 – File Content Disclosure on Rails by tptacek on Thursday March 21, 2019 @06:35PM (#19458032)
Because the media types are parsed and used to select layout templates (layout.html.erb vs layout.xml.erb, etc).
Re:CVE-2019-5418 – File Content Disclosure on Rails by Something1234 on Thursday March 21, 2019 @06:45PM (#19458101)
So why wouldn't we just have a mapping between mime-types and extensions for look ups? Why bother examining the accept header beyond splitting and searching within the list? Like in such a way that we're opening arbitrary files with it?
Re:CVE-2019-5418 – File Content Disclosure on Rails by tptacek on Thursday March 21, 2019 @06:48PM (#19458125)
That's essentially what the patch does; the "symbol" call only resolves for known-good mime types.
Re:CVE-2019-5418 – File Content Disclosure on Rails by Something1234 on Thursday March 21, 2019 @06:56PM (#19458188)
Where would this code be in the rails code base? I usually don't touch ruby. I'm mildly curious what was there originally.
Re:CVE-2019-5418 – File Content Disclosure on Rails by tptacek on Thursday March 21, 2019 @06:59PM (#19458211)
In the template resolver in ActionView. It's spread over multiple files and a bit hard to follow, which no doubt contributed to the problem.
Re:CVE-2019-5418 – File Content Disclosure on Rails by lostapathy on Thursday March 21, 2019 @09:47PM (#19459010)
Unfortunately a lot of rails internals are like this :(.
Re:CVE-2019-5418 – File Content Disclosure on Rails by anitil on Thursday March 21, 2019 @06:42PM (#19458082)
Aaaah Thankyou!