Ruby on Rails Security Project

Exploring the Security of Rails and friends.

Ruby on Rails Security Project header image 4

Entries Tagged as 'XSS and Rails'

Plugins merged and Ruby’s Net::HTTPS

September 29th, 2007 · No Comments

Good news: The csrf_killer plugin has been merged by Rick for Rails 2.0, so it is available in the current trunk. Go here for the changeset, and here for some documentation.
Furthermore, the insecure text helper methods strip_links, strip_tags and sanitize have been updated, mostly to strip nested tags. Still, I don't recommend using them, as […]

[Read more →]

Tags: Rails · XSS and Rails

RedCloth security thoughts

August 20th, 2007 · 4 Comments

Often times RedCloth is used to prevent Cross Site Scripting, because it uses a markup other than HTML to format text. "RedCloth is a module for using Textile in Ruby. Textile is a text format. A very simple text format. Another stab at making readable text that can be converted to HTML." For example *a […]

[Read more →]

Tags: XSS and Rails

Don’t use strip_tags, strip_links and sanitize

August 17th, 2007 · 7 Comments

Update: This is about earlier releases, Rails 2.0 provides a new sanitize method which uses a white list. Also, strip_tags and strip_links have been updated, the attack vectors below do not work anymore.
 
Rails includes several insecure text helpers, especially strip_tags, strip_links and sanitize. Do not rely on the these as they do not fulfill what […]

[Read more →]

Tags: XSS and Rails

Thou art so tolerant

July 12th, 2007 · 2 Comments

Web browsers are quite helpful: If you are a web-designer and you don't produce (X)HTML compliant pages, they will be rendered correctly anyway, because they quite fault-tolerant. But there are some features in some browsers that are questionable, here are some advanced examples:

Even though this file has a strange extension, IE will interpret the JavaScript […]

[Read more →]

Tags: XSS and Rails