Initial import to Tizen
[profile/ivi/python-twisted.git] / doc / core / development / security.html
1 <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html  PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'  'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html lang="en" xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3 <title>Twisted Documentation: Security</title>
4 <link href="../howto/stylesheet.css" rel="stylesheet" type="text/css"/>
5   </head>
6
7   <body bgcolor="white">
8     <h1 class="title">Security</h1>
9     <div class="toc"><ol><li><a href="#auto0">Bad input</a></li><li><a href="#auto1">Resource Exhaustion and DoS</a></li></ol></div>
10     <div class="content">
11
12 <span/>
13
14 <p>We need to do a full audit of Twisted, module by module.
15 This document list the sort of things you want to look for
16 when doing this, or when writing your own code.</p>
17
18 <h2>Bad input<a name="auto0"/></h2>
19
20 <p>Any place we receive untrusted data, we need to be careful.
21 In some cases we are not careful enough. For example, in HTTP
22 there are many places where strings need to be converted to
23 ints, so we use <code class="python">int()</code>. The problem
24 is that this well accept negative numbers as well, whereas
25 the protocol should only be accepting positive numbers.</p>
26
27 <h2>Resource Exhaustion and DoS<a name="auto1"/></h2>
28
29 <p>Make sure we never allow users to create arbitarily large
30 strings or files. Some of the protocols still have issues
31 like this. Place a limit which allows reasonable use but
32 will cut off huge requests, and allow changing of this limit.
33 </p>
34
35 <p>Another operation to look out for are exceptions. They can fill
36 up logs and take a lot of CPU time to render in web pages.</p>
37
38 </div>
39
40     <p><a href="../howto/index.html">Index</a></p>
41     <span class="version">Version: 12.1.0</span>
42   </body>
43 </html>