<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -30,9 +30,9 @@ module ActionController
 
     def redirect(to_url, response_status)
       self.headers[&quot;Status&quot;] = response_status
-      self.headers[&quot;Location&quot;] = to_url
+      self.headers[&quot;Location&quot;] = to_url.gsub(/[\r\n]/, '')
 
-      self.body = &quot;&lt;html&gt;&lt;body&gt;You are being &lt;a href=\&quot;#{to_url}\&quot;&gt;redirected&lt;/a&gt;.&lt;/body&gt;&lt;/html&gt;&quot;
+      self.body = &quot;&lt;html&gt;&lt;body&gt;You are being &lt;a href=\&quot;#{CGI.escapeHTML(to_url)}\&quot;&gt;redirected&lt;/a&gt;.&lt;/body&gt;&lt;/html&gt;&quot;
     end
 
     def prepare!</diff>
      <filename>actionpack/lib/action_controller/response.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e8577991dcc47bcb11f99fd6582ee2a3f8270498</id>
    </parent>
  </parents>
  <author>
    <name>Michael Koziarski</name>
    <login>NZKoz</login>
    <email>michael@koziarski.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/7282ed863ca7e6f928bae9162c9a63a98775a19d</url>
  <id>7282ed863ca7e6f928bae9162c9a63a98775a19d</id>
  <committed-date>2008-10-14T02:47:27-07:00</committed-date>
  <authored-date>2008-10-14T02:47:27-07:00</authored-date>
  <message>Sanitize the URLs passed to redirect_to to prevent a potential response spli

CGI.rb and mongrel don't do any sanitization of the contents of HTTP headers</message>
  <tree>3b6538fbe789c28a6a452566517272105630f6fe</tree>
  <committer>
    <name>Michael Koziarski</name>
    <login>NZKoz</login>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
