Ruby on Rails Security Project

Exploring the Security of Rails and friends.

Ruby on Rails Security Project header image 4

Entries from July 2007

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

sanitize() and blacklists

July 3rd, 2007 · 1 Comment

This is Rails' sanitize method:

sanitize(html) Sanitizes the html by converting <form> and <script> tags into regular text, and removing all "onxxx" attributes (so that arbitrary Javascript cannot be executed). It also removes xhref= and xsrc= attributes that start with "javascript:".

This is a blacklist method which removes potential harmful JavaScript. As I […]

[Read more →]

Tags: XSS and Rails