~certify-web-dev/twisted/certify-staging

« back to all changes in this revision

Viewing changes to doc/development/security.html

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-01-02 19:38:17 UTC
  • mfrom: (2.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100102193817-jphp464ppwh7dulg
Tags: 9.0.0-1
* python-twisted: Depend on the python-twisted-* 9.0 packages.
* python-twisted: Depend on python-zope.interface only. Closes: #557781.

Show diffs side-by-side

added added

removed removed

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