summaryrefslogtreecommitdiff
path: root/lang/python26/patches/patch-bc
blob: d4654dd15fb88a205d85ca9945e502b66002ad85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
$NetBSD: patch-bc,v 1.2 2014/03/12 12:57:06 obache Exp $

Fix for CVE-2010-3492 and CVE-2010-3493, taken from the Python SVN repository:

http://svn.python.org/view?view=rev&revision=86084

--- Lib/smtpd.py.orig	2010-11-22 18:18:59.000000000 +0000
+++ Lib/smtpd.py	2010-11-22 18:19:03.000000000 +0000
@@ -35,7 +35,6 @@
 and if remoteport is not given, then 25 is used.
 """
 
-
 # Overview:
 #
 # This file implements the minimal SMTP protocol as defined in RFC 821.  It
@@ -96,7 +95,6 @@
 COMMASPACE = ', '
 
 
-
 def usage(code, msg=''):
     print >> sys.stderr, __doc__ % globals()
     if msg:
@@ -104,7 +102,6 @@
     sys.exit(code)
 
 
-
 class SMTPChannel(asynchat.async_chat):
     COMMAND = 0
     DATA = 1
@@ -276,7 +273,6 @@
         self.push('354 End data with <CR><LF>.<CR><LF>')
 
 
-
 class SMTPServer(asyncore.dispatcher):
     def __init__(self, localaddr, remoteaddr):
         self._localaddr = localaddr
@@ -331,7 +327,6 @@
         raise NotImplementedError
 
 
-
 class DebuggingServer(SMTPServer):
     # Do something with the gathered message
     def process_message(self, peer, mailfrom, rcpttos, data):
@@ -347,7 +342,6 @@
         print '------------ END MESSAGE ------------'
 
 
-
 class PureProxy(SMTPServer):
     def process_message(self, peer, mailfrom, rcpttos, data):
         lines = data.split('\n')
@@ -388,7 +382,6 @@
         return refused
 
 
-
 class MailmanProxy(PureProxy):
     def process_message(self, peer, mailfrom, rcpttos, data):
         from cStringIO import StringIO
@@ -467,13 +460,11 @@
                 msg.Enqueue(mlist, torequest=1)
 
 
-
 class Options:
     setuid = 1
     classname = 'PureProxy'
 
 
-
 def parseargs():
     global DEBUGSTREAM
     try:
@@ -530,7 +521,6 @@
     return options
 
 
-
 if __name__ == '__main__':
     options = parseargs()
     # Become nobody