<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">1366</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2008-09-04T14:47:43+01:00</created-at>
  <creator-id type="integer">1366</creator-id>
  <milestone-due-on type="datetime">2008-10-13T00:00:00+01:00</milestone-due-on>
  <milestone-id type="integer">20253</milestone-id>
  <number type="integer">7</number>
  <permalink>update-security-guide</permalink>
  <priority type="integer">6</priority>
  <project-id type="integer">16213</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state nil="true"></state>
  <tag nil="true"></tag>
  <title>Update security guide</title>
  <updated-at type="datetime">2009-10-04T22:55:00+01:00</updated-at>
  <user-id type="integer">20241</user-id>
  <user-name>mrflip</user-name>
  <creator-name>Pratik</creator-name>
  <assigned-user-name>Pratik</assigned-user-name>
  <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
  <milestone-title>Guides batch 1</milestone-title>
  <original-body>The security guide needs to be updated with rails 2.0 stuff, like the new cookies session manager, http basic authentication, cross domain request forgery protection, etc.</original-body>
  <latest-body>The security guide needs to be updated with rails 2.0 stuff, like the new cookies session manager, http basic authentication, cross domain request forgery protection, etc.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;The security guide needs to be updated with rails 2.0 stuff,
like the new cookies session manager, http basic authentication,
cross domain request forgery protection, etc.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>The security guide needs to be updated with rails 2.0 stuff, like the new cookies session manager, http basic authentication, cross domain request forgery protection, etc.</body>
      <body-html>&lt;div&gt;&lt;p&gt;The security guide needs to be updated with rails 2.0 stuff,
like the new cookies session manager, http basic authentication,
cross domain request forgery protection, etc.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-04T14:47:45+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-04T14:47:45+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I would like to work on this.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I would like to work on this.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-05T09:47:29+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-05T09:47:34+01:00</updated-at>
      <user-id type="integer">26786</user-id>
      <user-name>Arjun</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I've got a guide ready and I could convert it.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I've got a guide ready and I could convert it.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-06T14:23:04+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-06T14:23:08+01:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Arjun : Given Heiko's knowledge in this area he's probably the best bet. But if you have any other ideas for guides, please PM me at Github.

Thanks.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Arjun : Given Heiko's knowledge in this area he's probably the
best bet. But if you have any other ideas for guides, please PM me
at Github.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-10T15:05:26+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-10T15:05:32+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Suggestions/nitpicks:

- The transition from the initial bullet points into Sessions is pretty abrupt. I'd like to see this start with an A-level head like &quot;Overview of Rails Security&quot;. Could discuss the general concept of web app security, the notion of multiple attack vectors, the necessity to keep up to date and to audit your application, the fact that no framework can make up for boneheaded devs doing stupid things.
- Session id section: I don't think there's much point to recommending future changes when we're documenting current versions. If you're going to mention MD5 collisions, should mention the effects: &quot;This would allow a user to...&quot;
- Not sure the general session guidelines are really germane in a security guide.
- I think you should take the important action items for the developer, pull them out of the general text, and highlight them as tips - for example, the fact that your session secret should not be a dictionary word should be highlighted as a tip. This will make life easier for readers who are new to security and just want to know &quot;what should I do?&quot;
- Reading the section on replay attacks for CookieStore sessions leaves me not sure how to prevent these attacks. You may need a code sample.
- Overall, I think you could use another level of organization. Maybe group things under two headings &quot;protecting your application&quot; and &quot;protecting your users&quot;
- Not sure the section on good passwords belongs in a Rails-specific guide.
- Nit: in the privilege escalation section, I would say that client-side validation is useless _against a determined attacker_. It certainly raises the bar at least a tiny bit, doesn't it? (I know folks who are defeated by javascript &quot;solutions&quot; that block downloading images via right-click).
- Would like to see a section - perhaps at the end - &quot;How to Keep up to date&quot;. Recognizing that the security landscape shifts, and that missing a new vulnerability can be catastrophic, we ought to point people at resources for keeping up with issues. Like rorsecurity.info :)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Suggestions/nitpicks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The transition from the initial bullet points into Sessions is
pretty abrupt. I'd like to see this start with an A-level head like
&quot;Overview of Rails Security&quot;. Could discuss the general concept of
web app security, the notion of multiple attack vectors, the
necessity to keep up to date and to audit your application, the
fact that no framework can make up for boneheaded devs doing stupid
things.&lt;/li&gt;
&lt;li&gt;Session id section: I don't think there's much point to
recommending future changes when we're documenting current
versions. If you're going to mention MD5 collisions, should mention
the effects: &quot;This would allow a user to...&quot;&lt;/li&gt;
&lt;li&gt;Not sure the general session guidelines are really germane in a
security guide.&lt;/li&gt;
&lt;li&gt;I think you should take the important action items for the
developer, pull them out of the general text, and highlight them as
tips - for example, the fact that your session secret should not be
a dictionary word should be highlighted as a tip. This will make
life easier for readers who are new to security and just want to
know &quot;what should I do?&quot;&lt;/li&gt;
&lt;li&gt;Reading the section on replay attacks for CookieStore sessions
leaves me not sure how to prevent these attacks. You may need a
code sample.&lt;/li&gt;
&lt;li&gt;Overall, I think you could use another level of organization.
Maybe group things under two headings &quot;protecting your application&quot;
and &quot;protecting your users&quot;&lt;/li&gt;
&lt;li&gt;Not sure the section on good passwords belongs in a
Rails-specific guide.&lt;/li&gt;
&lt;li&gt;Nit: in the privilege escalation section, I would say that
client-side validation is useless &lt;em&gt;against a determined
attacker&lt;/em&gt;. It certainly raises the bar at least a tiny bit,
doesn't it? (I know folks who are defeated by javascript
&quot;solutions&quot; that block downloading images via right-click).&lt;/li&gt;
&lt;li&gt;Would like to see a section - perhaps at the end - &quot;How to Keep
up to date&quot;. Recognizing that the security landscape shifts, and
that missing a new vulnerability can be catastrophic, we ought to
point people at resources for keeping up with issues. Like
rorsecurity.info :)&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-15T13:44:57+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-15T13:45:03+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>&quot;How to Keep up to date&quot; can also ask people to subscribe to http://groups.google.com/group/rubyonrails-security</body>
      <body-html>&lt;div&gt;&lt;p&gt;&quot;How to Keep up to date&quot; can also ask people to subscribe to
&lt;a href=&quot;http://groups.google.com/group/rubyonrails-security&quot;&gt;http://groups.google.com/group/r...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-15T13:47:35+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-15T13:47:40+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>- I added an introduction
- general session guidelines: Definitely needed because you should not
   store secrets in a client-side session storage (CookieStore)
- I highlighted the important countermeasures
- Good passwords: I think it's important, you need good passwords for
   the database and the web server. And you could tell you web app  
users.
- rewrote the end of the privilege escalation section
- added some resources of how to keep up to date:)</body>
      <body-html>&lt;div&gt;&lt;ul&gt;
&lt;li&gt;I added an introduction&lt;/li&gt;
&lt;li&gt;general session guidelines: Definitely needed because you
should not store secrets in a client-side session storage
(CookieStore)&lt;/li&gt;
&lt;li&gt;I highlighted the important countermeasures&lt;/li&gt;
&lt;li&gt;Good passwords: I think it's important, you need good passwords
for the database and the web server. And you could tell you web app
users.&lt;/li&gt;
&lt;li&gt;rewrote the end of the privilege escalation section&lt;/li&gt;
&lt;li&gt;added some resources of how to keep up to date:)&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-17T16:05:05+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-17T16:05:09+01:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-30T00:09:32+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:milestone: 
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-30T00:09:34+01:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I ready to work</body>
      <body-html>&lt;div&gt;&lt;p&gt;I ready to work&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-09-30T01:23:18+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-09-30T01:23:21+01:00</updated-at>
      <user-id type="integer">31566</user-id>
      <user-name>srinivasaenergy (at gmail)</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Typo in section 2.5.

&quot;Mot real-live applications choose ActiveRecordStore (or one of its derivatives) over file storage due to performance and maintenance reasons.&quot;

Mot -&gt; Most</body>
      <body-html>&lt;div&gt;&lt;p&gt;Typo in section 2.5.&lt;/p&gt;
&lt;p&gt;&quot;Mot real-live applications choose ActiveRecordStore (or one of
its derivatives) over file storage due to performance and
maintenance reasons.&quot;&lt;/p&gt;
&lt;p&gt;Mot -&amp;gt; Most&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-10T18:14:22+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-10-10T18:14:28+01:00</updated-at>
      <user-id type="integer">17465</user-id>
      <user-name>Mike Boone</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I read section 7.6 about regular expressions. I was not aware of needing to use \A and \z instead of ^ and $. I'm fixing my code now!

Anyway, I think the section could be a little clearer:

&quot;...match the string's end and beginning by $ and ^, instead of \z and \A.&quot; IMO it would be better to say: &quot;...match the string's beginning and end by ^ and $, instead of \A and \z.&quot;

The bad filename &quot;file.txt%0A&lt;script&gt;alert('hello')&lt;/script&gt;&quot; does not include a %0D as the subsequent text implies. Also, it might help to explain when/how Rails converts %0A into the linefeed inside the string. If you just enter the above string in irb, the /^[\w\.\-\+]+$/ regexp works. If you enter &quot;file.txt\n&lt;script&gt;alert('hello')&lt;/script&gt;&quot; in irb, the problem reveals itself.

Any links to other articles that cover this topic?

Thanks.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I read section 7.6 about regular expressions. I was not aware of
needing to use \A and \z instead of ^ and $. I'm fixing my code
now!&lt;/p&gt;
&lt;p&gt;Anyway, I think the section could be a little clearer:&lt;/p&gt;
&lt;p&gt;&quot;...match the string's end and beginning by $ and ^, instead of
\z and \A.&quot; IMO it would be better to say: &quot;...match the string's
beginning and end by ^ and $, instead of \A and \z.&quot;&lt;/p&gt;
&lt;p&gt;The bad filename &quot;file.txt%0A&quot; does not include a %0D as the subsequent text implies.
Also, it might help to explain when/how Rails converts %0A into the
linefeed inside the string. If you just enter the above string in
irb, the /^[\w.-+]+$/ regexp works. If you enter
&quot;file.txt\n&quot; in irb, the problem reveals itself.&lt;/p&gt;
&lt;p&gt;Any links to other articles that cover this topic?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-10T20:48:10+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-10-10T20:48:15+01:00</updated-at>
      <user-id type="integer">17465</user-id>
      <user-name>Mike Boone</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks, updated in repository.
I doubt there are other articles that cover this Ruby reg.expr.  
difference, it's fairly unknown,
I've seen this error even in popular books.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks, updated in repository. I doubt there are other articles
that cover this Ruby reg.expr. difference, it's fairly unknown,
I've seen this error even in popular books.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-11T15:00:13+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-10-11T15:00:16+01:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Heiko - I did a light edit pass on this one (it didn't need a heavy one). 

Is it worth adding a small section to cover http://weblog.rubyonrails.com/2008/10/19/response-splitting-risk ?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Heiko - I did a light edit pass on this one (it didn't need a
heavy one).&lt;/p&gt;
&lt;p&gt;Is it worth adding a small section to cover &lt;a href=&quot;http://weblog.rubyonrails.com/2008/10/19/response-splitting-risk&quot;&gt;http://weblog.rubyonrails.com/20...&lt;/a&gt;
?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-20T02:33:52+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-10-20T02:33:56+01:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I wrote a blog post about it at http://www.rorsecurity.info/journal/2008/10/20/header-injection-and-response-splitting.html

So I updated the guide, too.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I wrote a blog post about it at &lt;a href=&quot;http://www.rorsecurity.info/journal/2008/10/20/header-injection-and-response-splitting.html&quot;&gt;
http://www.rorsecurity.info/jour...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So I updated the guide, too.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-24T17:45:07+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-10-24T17:45:14+01:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Heiko, all - this guide is a very nice read, i really like it. 

It is also a bit lengthy though. I'm not sure if a more checklist-style overview would make sense, but it might help to organize the whole thing in such a way that each attack vector starts with a brief overview of maybe:

* how does this work?
* what countermeasures work (_particularly in rails_)?

... and only after that go into the details. E.g. for SQL injection:

* when you interpolate data right into your SQL queries the user can craft malicious SQL and ruin your database
* use A, B or C, but pay special attention to D</body>
      <body-html>&lt;div&gt;&lt;p&gt;Heiko, all - this guide is a very nice read, i really like
it.&lt;/p&gt;
&lt;p&gt;It is also a bit lengthy though. I'm not sure if a more
checklist-style overview would make sense, but it might help to
organize the whole thing in such a way that each attack vector
starts with a brief overview of maybe:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;how does this work?&lt;/li&gt;
&lt;li&gt;what countermeasures work (&lt;em&gt;particularly in
rails&lt;/em&gt;)?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;... and only after that go into the details. E.g. for SQL
injection:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;when you interpolate data right into your SQL queries the user
can craft malicious SQL and ruin your database&lt;/li&gt;
&lt;li&gt;use A, B or C, but pay special attention to D&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-26T15:17:09+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-10-26T15:17:11+00:00</updated-at>
      <user-id type="integer">7400</user-id>
      <user-name>Sven Fuchs</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Sven, thanks.

In fact it might be seem to be lengthy, because it is still one page -  
it will be several pages in the end.

In order to make it more easy to scan I included an introduction at  
the beginning of each chapter, so
that you know what it is all about. And I made it a two-in-one  
document: By scanning the highlighted
parts you can easily find all countermeasures for Rails.

Indeed it is not a plug'n'play easy-going guide, because I want people  
to understand why they have
to do this or that. 40 pages are not that bad if you compare it to PHP  
security books:)

Anyway, if you'd like to add something specific, or highlight more,  
you can go to
http://www.rorsecurity.info, download the book in pdf, add your  
comments there and
send it to me.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Sven, thanks.&lt;/p&gt;
&lt;p&gt;In fact it might be seem to be lengthy, because it is still one
page - it will be several pages in the end.&lt;/p&gt;
&lt;p&gt;In order to make it more easy to scan I included an introduction
at the beginning of each chapter, so that you know what it is all
about. And I made it a two-in-one document: By scanning the
highlighted parts you can easily find all countermeasures for
Rails.&lt;/p&gt;
&lt;p&gt;Indeed it is not a plug'n'play easy-going guide, because I want
people to understand why they have to do this or that. 40 pages are
not that bad if you compare it to PHP security books:)&lt;/p&gt;
&lt;p&gt;Anyway, if you'd like to add something specific, or highlight
more, you can go to &lt;a href=&quot;http://www.rorsecurity.info&quot;&gt;http://www.rorsecurity.info&lt;/a&gt;,
download the book in pdf, add your comments there and send it to
me.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2008-10-26T21:45:06+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-10-26T21:45:08+00:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Heiko, we're going to mark this one as accepted. Can you add your bio to the authors page, please?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Heiko, we're going to mark this one as accepted. Can you add
your bio to the authors page, please?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-01T18:11:10+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-11-01T18:11:12+00:00</updated-at>
      <user-id type="integer">7211</user-id>
      <user-name>Mike Gunderloy</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>And also lemme know your email address please :)</body>
      <body-html>&lt;div&gt;&lt;p&gt;And also lemme know your email address please :)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-01T18:41:39+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-11-01T18:41:42+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body nil="true"></body>
      <body-html nil="true"></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-02T15:00:07+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-11-02T15:00:08+00:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Huh? Ok, again:
Good news. I've added my bio. Here's my e-mail 42 {et} rorsecurity.info :)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Huh? Ok, again: Good news. I've added my bio. Here's my e-mail
42 {et} rorsecurity.info :)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-02T15:02:38+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>actionview</tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-11-02T15:02:39+00:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>...</body>
      <body-html>&lt;div&gt;&lt;p&gt;...&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2008-11-02T15:04:03+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: actionview
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2008-11-02T15:04:05+00:00</updated-at>
      <user-id type="integer">5071</user-id>
      <user-name>Heiko Webers</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-01-06T20:55:09+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:title: okey oyna
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state>resolved</state>
      <tag>okey oyna</tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-01-06T20:55:13+00:00</updated-at>
      <user-id type="integer">1366</user-id>
      <user-name>Pratik</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>How about SSL security?

I'm not sure how to setup a secure SSL connection between browser and Rails application with mongrel and thin.</body>
      <body-html>&lt;div&gt;&lt;p&gt;How about SSL security?&lt;/p&gt;
&lt;p&gt;I'm not sure how to setup a secure SSL connection between
browser and Rails application with mongrel and thin.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-13T10:41:15+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:state: resolved
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag>okey oyna</tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-02-13T10:41:19+00:00</updated-at>
      <user-id type="integer">47323</user-id>
      <user-name>OmniBus</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>There are several spots in 'security' where Textile gets in the way of formatting 'verbatim' stuff, especially where 'regular expressions' in code snippets are concerned. I've found no way to make Textile acknowledge _two_ plus signs with _different_ meaning in regexes, resulting in &lt;notextile&gt;&lt;tt&gt;...&lt;/tt&gt;&lt;/notextile&gt; appearing in the HTML output. Is there some form of escape for this?</body>
      <body-html>&lt;div&gt;&lt;p&gt;There are several spots in 'security' where Textile gets in the
way of formatting 'verbatim' stuff, especially where 'regular
expressions' in code snippets are concerned. I've found no way to
make Textile acknowledge &lt;em&gt;two&lt;/em&gt; plus signs with
&lt;em&gt;different&lt;/em&gt; meaning in regexes, resulting in &lt;tt&gt;...&lt;/tt&gt;
appearing in the HTML output. Is there some form of escape for
this?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-19T08:51:57+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: okey oyna
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag>rendering</tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-02-19T08:52:01+00:00</updated-at>
      <user-id type="integer">47997</user-id>
      <user-name>Andreas Scherer</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>As there seems to be no way to change my recent comment, I try to explain that '...' should have read &lt;code&gt;&lt;notextile&gt;&lt;tt&gt; ... &lt;/tt&gt;&lt;/notextile&gt;&lt;/code&gt;. (Hope this comes out as intended, because there also seems to be no 'preview' button in this editing system.)</body>
      <body-html>&lt;div&gt;&lt;p&gt;As there seems to be no way to change my recent comment, I try
to explain that '...' should have read &lt;code&gt;&lt;tt&gt;...&lt;/tt&gt;&lt;/code&gt; .
(Hope this comes out as intended, because there also seems to be no
'preview' button in this editing system.)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-19T09:14:16+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: rendering
</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-02-19T09:14:21+00:00</updated-at>
      <user-id type="integer">47997</user-id>
      <user-name>Andreas Scherer</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Nope, here goes a second re-try: &amp;lt;notextile&amp;gt;&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&amp;lt;/notextile&amp;gt;</body>
      <body-html>&lt;div&gt;&lt;p&gt;Nope, here goes a second re-try:
&amp;lt;notextile&amp;gt;&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&amp;lt;/notextile&amp;gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-19T09:15:29+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-02-19T09:15:34+00:00</updated-at>
      <user-id type="integer">47997</user-id>
      <user-name>Andreas Scherer</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks ascherer, we implemented a temporary workaround http://github.com/lifo/docrails/commit/0d145d9b37a224955f2bbd346376988358966dde</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks ascherer, we implemented a temporary workaround &lt;a href=&quot;http://github.com/lifo/docrails/commit/0d145d9b37a224955f2bbd346376988358966dde&quot;&gt;
http://github.com/lifo/docrails/...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-02-28T16:12:43+00:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-02-28T16:12:49+00:00</updated-at>
      <user-id type="integer">11378</user-id>
      <user-name>Xavier Noria</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>- The Session Expiry section assumes that the user is using a database session store. Most people use the cookie session store, so the described technique is not applicable. Instead, the guide should recommend the reader to store a 'created_at' attribute in the session. The developer should, in a before_filter, check whether 'created_at' is a timestamp that's too old. If it is then the app should expire the session with reset_session.
- The User Management section should describe how one should securely store passwords in the database. Not everybody uses or can use restful_authentication. The guide should recommend using bcrypt for storing passwords.
- The Session Storage section should tell the reader how to switch to the ActiveRecord store, or refer to the relevant guide, for convenience.</body>
      <body-html>&lt;div&gt;&lt;ul&gt;
&lt;li&gt;The Session Expiry section assumes that the user is using a
database session store. Most people use the cookie session store,
so the described technique is not applicable. Instead, the guide
should recommend the reader to store a 'created_at' attribute in
the session. The developer should, in a before_filter, check
whether 'created_at' is a timestamp that's too old. If it is then
the app should expire the session with reset_session.&lt;/li&gt;
&lt;li&gt;The User Management section should describe how one should
securely store passwords in the database. Not everybody uses or can
use restful_authentication. The guide should recommend using bcrypt
for storing passwords.&lt;/li&gt;
&lt;li&gt;The Session Storage section should tell the reader how to
switch to the ActiveRecord store, or refer to the relevant guide,
for convenience.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-22T13:22:32+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-07-22T13:22:37+01:00</updated-at>
      <user-id type="integer">10679</user-id>
      <user-name>Hongli Lai</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1366</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Apologies if this is somewhere in the guide and I've missed it. 

---------

Failing to filter fields from serialized objects is an easy security problem to miss.

For example, if you set up your users using default RESTful routes, then
  /users/:id.xml
will show all fields by default, including (if they exist) the persistence-token, crypted password, salt, email address and openid.

You can disable the formatted routes, or you can sanitize these fields by overriding to_xml, to_json, etc to always use the
     :only =&gt; [...whitelisted fields...]
flag.

The plugin at http://github.com/mrflip/attr_visible that helps set defaults for the serialization methods.

----------

Also be thoughtful about fields that should be writeable on create but not on update: for example, username, or an &quot;I agree to these terms&quot; flag. Remember, even if they're not present in the form they can be submitted as params. Your best bet is to remove them from attr_accessible and set them directly in the create action.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Apologies if this is somewhere in the guide and I've missed
it.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Failing to filter fields from serialized objects is an easy
security problem to miss.&lt;/p&gt;
&lt;p&gt;For example, if you set up your users using default RESTful
routes, then&lt;br&gt;
/users/:id.xml will show all fields by default, including (if they
exist) the persistence-token, crypted password, salt, email address
and openid.&lt;/p&gt;
&lt;p&gt;You can disable the formatted routes, or you can sanitize these
fields by overriding to_xml, to_json, etc to always use the&lt;br&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt; :only =&amp;gt; [...whitelisted fields...]&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;flag.&lt;/p&gt;
&lt;p&gt;The plugin at &lt;a href=
&quot;http://github.com/mrflip/attr_visible&quot;&gt;http://github.com/mrflip/attr_visible&lt;/a&gt;
that helps set defaults for the serialization methods.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Also be thoughtful about fields that should be writeable on
create but not on update: for example, username, or an &quot;I agree to
these terms&quot; flag. Remember, even if they're not present in the
form they can be submitted as params. Your best bet is to remove
them from attr_accessible and set them directly in the create
action.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-10-04T22:27:48+01:00</created-at>
      <creator-id type="integer">1366</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer">20253</milestone-id>
      <number type="integer">7</number>
      <permalink>update-security-guide</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16213</project-id>
      <state nil="true"></state>
      <tag nil="true"></tag>
      <title>Update security guide</title>
      <updated-at type="datetime">2009-10-04T22:55:00+01:00</updated-at>
      <user-id type="integer">20241</user-id>
      <user-name>mrflip</user-name>
      <creator-name>Pratik</creator-name>
      <assigned-user-name>Pratik</assigned-user-name>
      <url>http://rails.lighthouseapp.com/projects/16213/tickets/7</url>
      <milestone-title>Guides batch 1</milestone-title>
    </version>
  </versions>
</ticket>
